home *** CD-ROM | disk | FTP | other *** search
/ IBM OEM Software Product … CD For PC Manufacturers / IBM OEM Software - Product Sampler CD for PC Manufacturers.iso / InternetIntranets / Notes / LOTUS027.DSK / PERWEB46.NTF (.txt) < prev    next >
Lotus Notes Database  |  1997-08-14  |  948KB  |  7,635 lines

  1. Personal Web Navigator (R4.6)
  2. #1StdR46PersonalWebNavigator
  3. FOLDER_DIRECTORY_OBJECT
  4. Favorites and Bookmarks|Bookmarks|Favorites|Bookmarks
  5. STG27910
  6. Web Bots\Page Minder
  7. CN=Lotus Notes Template Development/O=Lotus Notes
  8. Web Bots\Web Ahead
  9. }&lemH
  10. EOu#B 
  11. J7)e`|qT
  12. >%!-eWv
  13. CN=Dave Newbold/O=IrisLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesCN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  14. ###########################################
  15. $Modified
  16.     1S2S3S
  17. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$UpdatedBy$$FormScript_O
  18. $Flags
  19.     0SL1S4S5S3724
  20. $TITLE
  21. CN=Teresa Deane/O=Iris#####################################
  22. URLDoclinkURLDoclink
  23. URLDoclink
  24. CN=Winnie Liang/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###################
  25. }&lemH
  26. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##########################################################
  27. CN=Teresa Deane/O=Irisc:\notes\data\perweb46.ntf(Home)Rin
  28. CN=Teresa Deane/O=Iris
  29. Personal Web Navigator (R4.6)
  30. #1StdR46PersonalWebNavigator#######################
  31. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##########################################################
  32. Internet OptionsAdminDC
  33. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes####################
  34. (Internet Profile)|Internet ProfilesB
  35. $Conflict
  36. Admin
  37.     L1S2S3S1
  38. Internet Options
  39. Internet Options&
  40. Lotus NotesCN=Lotus Notes Template Development/O=Lotus Notes#################################################
  41. (ImportFavorite)
  42. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###########################
  43. O=Lotus Notes
  44. O=Lotus Notes
  45. PURSAFO
  46. |.:#U
  47. O=Lotus Notes
  48. CN=Lotus Notes Template Development/O=Lotus Notes
  49. PURSAFO
  50. Fde!f^^
  51. 6f((c
  52. $ACLDigest
  53. O=Lotus Notes
  54. O=Lotus Notes
  55. PURSAFO
  56. |.:#U
  57. O=Lotus Notes
  58. CN=Lotus Notes Template Development/O=Lotus Notes
  59. PURSAFO
  60. Fde!f^^
  61. $INFO
  62. $BODY
  63. Times New Roman
  64. &Arial
  65. Using Personal 
  66. Web Navigator 4.6
  67.     This database is designed so you can easily access the Internet right from your Notes workstation and store Web pages in your own Personal Web Navigator database.  
  68. Getting started viewing and searching pages
  69.     To browse a page, click  
  70. ?_?__
  71. `!b`1
  72. 7`^///?
  73. ?b___
  74. `bOOO
  75. `<b!R
  76. *.BMP
  77. CGM Imag
  78. ;*.WR1;*.WRK;*.W
  79.       which brings up your home page specified in Internet Options.  You can enter new URL's for other Web pages in the search bar.   You can save the page in the All Bookmarks view to read later by clicking the Add Bookmark... button. We have also included some of our favorite Web pages in the All Bookmarks view, which you can display by switching to the All Bookmarks view and selecting a page.
  80.     If you want to search for information in pages stored in the Personal Web Navigator database, you can search the database using full text search as you would any other Notes database. See online Help (Help4.nsf) for information on using full text search. 
  81.     To use an Internet search engine, such as CNet, to search all available pages on the Internet, click 
  82. ?_?__
  83. `!b`1
  84. 7`^///?
  85. ?b___
  86. `bOOO
  87. `<b!R
  88. 922 2EDFA3BC D$S
  89. *.BMP
  90. CGM Imag
  91.      and enter your search criteria.
  92.     You can change the default Internet search engine as well as other Personal Web Navigator settings in the Internet Options document. To access this document, choose Actions - Internet Options when you are using the Personal Web Navigator database.
  93. Using the Personal Web Navigator views
  94.     The Personal Web Navigator database contains the following views:
  95.     Favorites and Bookmarks 
  96.     Displays pages for which you created bookmarks and also pages that you added to the Favorites folder.
  97.     Web Bots
  98.     Web Ahead 
  99.     Notes launches a background agent, which you enable, called Web Ahead that runs on each of the pages stored in this folder. This agent retrieves all the Web pages specified by the URLs on a particular Web page and saves all the resulting Web pages in your database for you to read later. You can set the agent to retrieve the URLs several levels down from the page you specify. 
  100.     Page Minder 
  101.     Notes launches a background 
  102.     agent
  103.     , which you enable, called Page Minder that monitors each of the Web pages stored in this folder and notifies you when the contents of that page change.
  104.     All Bookmarks
  105.      Lets you quickly view your favorite pages. You can create bookmarks for pages stored in the Personal Web Navigator database as well as pages that you access frequently on the Web.
  106.     All Pages
  107.      Displays all pages stored in the Personal Web Navigator database. You can browse these pages even when you are disconnected from the network.
  108.     Other
  109.     File Archive
  110.      Displays a list of files downloaded from Web pages, sorted in alphabetical order by file size.
  111.     House Cleaning
  112.      Displays a list of documents, sorted in ascending order by document size.
  113.     Use these views to reduce the number of documents in the database based on document or file size.
  114. Getting more information
  115.     This is just a brief summary of the features you may want to use in the Personal Web Navigator database. For additional information,
  116. '++LotusScript Development Environment:2:5:(Options):0:66
  117. '++LotusScript Development Environment:2:5:(Forward):0:1
  118. Declare Sub Click(Source As Button)
  119. '++LotusScript Development Environment:2:5:(Declarations):0:2
  120. '++LotusScript Development Environment:2:2:BindEvents:1:129
  121. Private Sub BindEvents(Byval Objectname_ As String)
  122.      Static Source As BUTTON
  123.      Set Source = Bind(Objectname_)
  124.      On Event Click From Source Call Click
  125. End Sub
  126. '++LotusScript Development Environment:2:2:Click:1:12
  127. Sub Click(Source As Button)
  128.      
  129.      Dim mailserver As String
  130.      Dim helpdb As New notesdatabase("", "")
  131.      
  132.      Dim workspace As New NotesUIWorkspace
  133.      Dim s As New notessession
  134.      mailserver = s.getenvironmentstring("MailServer", True)
  135.      
  136.      If Helpdb.open("", "help4.nsf") Then 
  137.           Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  138.      Elseif Helpdb.open("", "helplt4.nsf") Then
  139.           Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  140.      Elseif Helpdb.open(Mailserver, "help4.nsf") Then
  141.           Call workspace.OpenDatabase ( mailserver, "help4.nsf", "Web")
  142.      Elseif Helpdb.open(Mailserver, "helplt4.nsf") Then
  143.           Call workspace.OpenDatabase ( mailserver, "helplt4.nsf", "Web")
  144.      Else
  145.           Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  146.      End If
  147.      
  148. End Sub
  149.      click the following help icon:
  150. 60606
  151.  @  @@ @` @
  152. @@ @@@@@`@@
  153. `@ `@@`@``@
  154. O=Lotus Notes
  155. O=Lotus Notes
  156. PURSAFO
  157. |.:#U
  158. O=Lotus Notes
  159. CN=Lotus Notes Template Development/O=Lotus Notes
  160. PURSAFO
  161. Fde!f^^
  162. $INFO
  163. $BODY
  164. Times New Roman
  165. &Arial
  166. About Personal
  167. Web Navigator 4.6
  168.     Welcome to the Personal Web Navigator database.  The Personal Web Navigator database allows you to access the Internet directly from your Notes workstation.  This database acts as a repository for Web pages and files that have been downloaded so you can easily organize your pages and browse them when you are disconnected from the network. It also acts as an easy entry point for exploring the Internet.  This version of the Personal Web Navigator database allows you to make use of the integrated Notes with Internet Explorer option to view pages using Internet Explorer while keeping all of the powerful functionality of Notes.
  169.     Choose "Using This Database" from the Help menu for information on using this database. 
  170. -------------------
  171.     (Close this window to return to the database.)
  172. O=Lotus Notes
  173. O=Lotus Notes
  174. PURSAFO
  175. |.:#U
  176. O=Lotus Notes
  177. CN=Lotus Notes Template Development/O=Lotus Notes
  178. PURSAFO
  179. Fde!f^^
  180. $INFO
  181. $BODY
  182. Other\House Cleaning|House Cleaning/O0
  183. TIME_DATE
  184. TIME_DATE
  185.     0S0E
  186.     0S0E
  187. $47Title$45$46$Conflict
  188. Admin
  189. HelpForm
  190. WebBrowserForm
  191. bookmark
  192.     L1S2S3S13S14S15S
  193. $47$45
  194. $45Title
  195. $47Size
  196. TitleDocument title$45DateN
  197. TIME_DATE
  198. TIME_DATE
  199.     0S0E
  200. $46Type*
  201.     0S0E
  202. Admin
  203. Admin
  204. forward
  205. HTMLForm
  206. WebBrowserForm
  207.     12S13S
  208. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#################################
  209. Other\File Archive|File Archive/O
  210.     3S15S
  211.     3S15S
  212. $46NULL$45$Conflict
  213.     L1S1
  214. $46$45
  215. $46$45
  216. $46$45
  217.  $46File NameJ
  218.     3S15SNULL$45File SizeJ
  219.     3S15S&
  220. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##############################
  221. CN=Ryan Jansen/O=IrisCN=Barbara Mathers/O=IrisCN=Ryan Jansen/O=IrisCN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesLotus NotesCN=Teresa Deane/O=IrisLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesCN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesDatabase Scriptt34Q1######################################
  222. ShareWebPageShareWebPageDC
  223. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#
  224. (ImportBookmark)CD
  225. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################################################
  226. ##########################################################
  227. ##########################################################
  228. Categori_zeK
  229. _Edit Document
  230. Send Docu_ment
  231. _Forward
  232. _Move to Folder...
  233. _Remove from Folder...
  234. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  235. '++LotusScript Development Environment:2:5:(Forward):0:1
  236. Declare Sub Click(Source As Button)
  237. '++LotusScript Development Environment:2:5:(Declarations):0:2
  238. '++LotusScript Development Environment:2:2:BindEvents:1:129
  239. Private Sub BindEvents(Byval Objectname_ As String)
  240.      Static Source As BUTTON
  241.      Set Source = Bind(Objectname_)
  242.      On Event Click From Source Call Click
  243. End Sub
  244. '++LotusScript Development Environment:2:2:Click:1:12
  245. Sub Click(Source As Button)
  246.      
  247.      Browse
  248. End Sub
  249. _DeleteK'++LotusScript Development Environment:2:5:(Options):0:66
  250. '++LotusScript Development Environment:2:5:(Forward):0:1
  251. Declare Sub Click(Source As Button)
  252. '++LotusScript Development Environment:2:5:(Declarations):0:2
  253. '++LotusScript Development Environment:2:2:BindEvents:1:129
  254. Private Sub BindEvents(Byval Objectname_ As String)
  255.      Static Source As BUTTON
  256.      Set Source = Bind(Objectname_)
  257.      On Event Click From Source Call Click
  258. End Sub
  259. '++LotusScript Development Environment:2:2:Click:1:12
  260. Sub Click(Source As Button)
  261.      ViewDelete
  262. End Sub
  263. _Reduce to BookmarkK'++LotusScript Development Environment:2:5:(Options):0:66
  264. '++LotusScript Development Environment:2:5:(Forward):0:1
  265. Declare Sub Click(Source As Button)
  266. '++LotusScript Development Environment:2:5:(Declarations):0:2
  267. '++LotusScript Development Environment:2:2:BindEvents:1:129
  268. Private Sub BindEvents(Byval Objectname_ As String)
  269.      Static Source As BUTTON
  270.      Set Source = Bind(Objectname_)
  271.      On Event Click From Source Call Click
  272. End Sub
  273. '++LotusScript Development Environment:2:2:Click:1:12
  274. Sub Click(Source As Button)
  275.      
  276.      Dim docCollection As NotesDocumentCollection
  277.      Dim docLocal As NotesDocument
  278.      
  279.      Set docCollection = db.UnprocessedDocuments
  280.      If (docCollection.Count = 0) Then
  281.           Msgbox "You must select a document.",16,"Error"
  282.           Exit Sub
  283.      End If
  284.      Set docLocal = docCollection.GetFirstDocument
  285.      While Not (docLocal Is Nothing)
  286.           RemoveObjects docLocal
  287.           ReduceToLink docLocal
  288.           Set docLocal = docCollection.GetNextDocument(docLocal)
  289.      Wend
  290. End Sub
  291. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  292. '++LotusScript Development Environment:2:5:(Forward):0:1
  293. Declare Sub Click(Source As Button)
  294. '++LotusScript Development Environment:2:5:(Declarations):0:2
  295. '++LotusScript Development Environment:2:2:BindEvents:1:129
  296. Private Sub BindEvents(Byval Objectname_ As String)
  297.      Static Source As BUTTON
  298.      Set Source = Bind(Objectname_)
  299.      On Event Click From Source Call Click
  300. End Sub
  301. '++LotusScript Development Environment:2:2:Click:1:12
  302. Sub Click(Source As Button)
  303.      
  304.      PrintWebDocument
  305. End Sub
  306. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  307. '++LotusScript Development Environment:2:5:(Forward):0:1
  308. Declare Sub Click(Source As Button)
  309. '++LotusScript Development Environment:2:5:(Declarations):0:2
  310. '++LotusScript Development Environment:2:2:BindEvents:1:129
  311. Private Sub BindEvents(Byval Objectname_ As String)
  312.      Static Source As BUTTON
  313.      Set Source = Bind(Objectname_)
  314.      On Event Click From Source Call Click
  315. End Sub
  316. '++LotusScript Development Environment:2:2:Click:1:12
  317. Sub Click(Source As Button)
  318.      
  319.      Dim docLocal As NotesDocument
  320.      Dim docCollection As NotesDocumentCollection     
  321.      Set docCollection = db.UnprocessedDocuments
  322.      If (docCollection.Count = 0) Then
  323.           Msgbox "You must select a document.",16,"Error"
  324.           Exit Sub
  325.      Else
  326.           For j = 1 To docCollection.Count
  327.                Set docLocal = docCollection.getnthdocument(j)               
  328.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  329.                     Select Case docLocal.ForwardOptions(0)
  330.                     Case "1" : 'user wants to forward the URL only
  331.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  332.                     Case "2" : 'user wants to send entire page
  333.                          Call  ViewForward(docLocal)
  334.                     End Select
  335.           'remove any remaining fields that don't need to be carried around
  336.                     docLocal.RemoveItem "ForwardOptions" 
  337.                     docLocal.save True, False
  338.                     
  339.                End If
  340.                Exit Sub
  341.           Next
  342.      End If
  343.      Exit Sub
  344. End Sub
  345. '++LotusScript Development Environment:2:5:(Options):0:74
  346. Option Public
  347. Use "InternetFunctions"
  348. '++LotusScript Development Environment:2:5:(Forward):0:1
  349. '++LotusScript Development Environment:2:5:(Declarations):0:2
  350. '++LotusScript Development Environment:2:5:(Options):0:66
  351. '++LotusScript Development Environment:2:5:(Forward):0:1
  352. Declare Sub Postopen(Source As Notesuiview)
  353. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  354. '++LotusScript Development Environment:2:5:(Declarations):0:2
  355. '++LotusScript Development Environment:2:2:BindEvents:1:129
  356. Private Sub BindEvents(Byval Objectname_ As String)
  357.      Static Source As NOTESUIVIEW
  358.      Set Source = Bind(Objectname_)
  359.      On Event Postopen From Source Call Postopen
  360.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  361. End Sub
  362. '++LotusScript Development Environment:2:2:Postopen:1:12
  363. Sub Postopen(Source As Notesuiview)
  364.      InstantiateObjects
  365. End Sub
  366. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  367. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  368.      Call MoveToFolder(source,target,continue)
  369. End Sub
  370. O=Lotus Notes
  371. O=Lotus Notes
  372. PURSAFO
  373. |.:#U
  374. O=Lotus Notes
  375. CN=Lotus Notes Template Development/O=Lotus Notes
  376. PURSAFO
  377. Fde!f^^
  378. K;Jut
  379. $SCRIPTOBJ_12
  380. $SCRIPTOBJ_11
  381. $TITLE
  382. $Index
  383. $Formula
  384. $FormulaClass
  385. $VIEWFORMAT
  386. $FormFormula
  387. $Comment
  388. $ACTIONS
  389. $SCRIPTOBJ_6
  390. $SCRIPTOBJ_7
  391. $SCRIPTOBJ_8
  392. $SCRIPTOBJ_9
  393. $SCRIPTOBJ_10
  394. $ViewGlobalScript
  395. $ViewGlobalScript_O
  396. $ViewScript
  397. $ViewScript_O
  398. O=Lotus Notes
  399. O=Lotus Notes
  400. PURSAFO
  401. |.:#U
  402. O=Lotus Notes
  403. CN=Lotus Notes Template Development/O=Lotus Notes
  404. PURSAFO
  405. Fde!f^^
  406. sZ%!ZM}
  407. j2A/:
  408. $Flags
  409. Personal Web Navigator Internet Options
  410. &Arial
  411. '++LotusScript Development Environment:2:5:(Options):0:74
  412. Option Public
  413. Use "InternetFunctions"
  414. '++LotusScript Development Environment:2:5:(Forward):0:1
  415. '++LotusScript Development Environment:2:5:(Declarations):0:10
  416. Dim DocWasSaved As Integer
  417. Dim HPValue As String
  418. Dim OldHPValue As String
  419. Dim SearchValue As String
  420. Dim OldSearchValue As String
  421. Dim uidoc As notesuidocument
  422.  Admin'++LotusScript Development Environment:2:5:(Options):0:66
  423. '++LotusScript Development Environment:2:5:(Forward):0:1
  424. Declare Sub Postopen(Source As Notesuidocument)
  425. Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)
  426. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  427. '++LotusScript Development Environment:2:5:(Declarations):0:2
  428. '++LotusScript Development Environment:2:2:BindEvents:1:129
  429. Private Sub BindEvents(Byval Objectname_ As String)
  430.      Static Source As NOTESUIDOCUMENT
  431.      Set Source = Bind(Objectname_)
  432.      On Event Postopen From Source Call Postopen
  433.      On Event Querysave From Source Call Querysave
  434.      On Event Queryclose From Source Call Queryclose
  435. End Sub
  436. '++LotusScript Development Environment:2:2:Postopen:1:12
  437. Sub Postopen(Source As Notesuidocument)
  438.      'initialize some varibales
  439.      Set w = New notesuiworkspace
  440.      Set uidoc = w.currentdocument
  441.      Set note = source.Document
  442.      Set session = New NotesSession
  443.      Set db = session.CurrentDatabase
  444.      'we need to see if a profile document exists
  445.      Set view = db.GetView("(Internet Profile)")
  446.      Set docProfile = view.GetFirstDocument
  447.      If Not (docProfile Is Nothing) Then
  448.           'clear out any existing items, even though there probably isn't any
  449.           Forall fields In note.Items
  450.                fields.Remove
  451.           End Forall
  452.                'copy the items from the docProfile to this and disable saving
  453.           docProfile.CopyAllItems note
  454.      End If
  455.      DocWasSaved = False
  456.      source.Refresh
  457. End Sub
  458. '++LotusScript Development Environment:2:2:Querysave:1:12
  459. Sub Querysave(Source As Notesuidocument, Continue As Variant)
  460.      
  461.      Dim lpSubKey1 As String
  462.      Dim IEHomePageURL As String
  463.      Dim NewHPValue As String
  464.      Dim IESearchURL As String
  465.      Dim NewSearchValue As String
  466.      
  467.      If (docProfile Is Nothing) Then
  468.           note.Saveoptions = "1"
  469.      Else
  470.           note.saveoptions = "0"
  471.           DocWasSaved = True
  472.           
  473.      End If
  474.      Call Session.Setenvironmentvar("W3LocalFormSave", "1", False)
  475.      
  476.      'If the home page or the search url have changed, write them out to the registry
  477.      
  478.      If GetcurrentLocation = "3" Then
  479.           If ( source.document.startupoptions(0) ="1") And (source.document.openurl(0) <> "") Then
  480.           'synchronize homepage with IE if Location is set to Notes with IE
  481.                NewHPValue = source.fieldgettext("OpenURL")
  482.                If NewHPValue <> OldHPValue Then
  483.                     lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  484.                     IEHomePageURL =  GetRegValue (lpsubkey1, "Start Page" )
  485.                     CompareResult = CompareValues (IEHomePageURL, NewHPValue)
  486.                     Select Case CompareResult
  487.                     Case "SetRegistry"
  488.           'Put the Notes Value in the W32 Registry
  489.                          Call SetRegValue(lpSubKey1, "Start Page", NewHPValue)
  490.                     Case "SetNotes"
  491.           'Put the W32 Registry value in Notes
  492.                          docprofile.OpenURL = IEHomePageURL
  493.                          Call docprofile.save(True, False)
  494.                     End Select
  495.                End If
  496.           End If
  497.           
  498.           'Sync search page values if they have changed
  499.           
  500.           NewSearchValue = source.fieldgettext("PreferredSearchEngine")
  501.           NewSearchURL = source.fieldgettext("SearchURL")
  502.           If NewSearchValue <> OldSearchValue Then
  503.                lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  504.                IESearchURL =  GetRegValue (lpsubkey1, "Search Page" )
  505.                CompareResult = CompareValues (IESearchURL, NewSearchURL)
  506.                Select Case CompareResult
  507.                Case "SetRegistry"
  508.           'Put the Notes Value in the W32 Registry
  509.                     Call SetRegValue(lpSubKey1, "Search Page", NewSearchURL)
  510.                Case "SetNotes"
  511.           'Put the W32 Registry value in Notes
  512.                     source.document.SearchURL = IESearchURL
  513.                End Select
  514.           End If
  515.      End If
  516. End Sub
  517. '++LotusScript Development Environment:2:2:Queryclose:1:12
  518. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  519.      source.refreshhideformulas
  520.           'see if there is a profile document
  521.      If Not (DocWasSaved) Or (docProfile Is Nothing) Then
  522.           'there isn't a profile document, go ahead and save
  523.           Exit Sub
  524.      Else
  525.           'we need to delete the items in the docprofile and copy the current items to it
  526.           Forall fields In docProfile.Items
  527.                fields.Remove
  528.           End Forall
  529.           note.CopyAllItems docProfile
  530.           docProfile.SaveOptions = "1"
  531.           docProfile.Save True, True
  532.      End If
  533. End Sub
  534. '++LotusScript Development Environment:2:5:(Options):0:66
  535. '++LotusScript Development Environment:2:5:(Forward):0:1
  536. Declare Sub Exiting(Source As Field)
  537. '++LotusScript Development Environment:2:5:(Declarations):0:2
  538. '++LotusScript Development Environment:2:2:BindEvents:1:129
  539. Private Sub BindEvents(Byval Objectname_ As String)
  540.      Static Source As FIELD
  541.      Set Source = Bind(Objectname_)
  542.      On Event Exiting From Source Call Exiting
  543. End Sub
  544. '++LotusScript Development Environment:2:2:Exiting:1:12
  545. Sub Exiting(Source As Field)
  546.      
  547. End Sub
  548. '++LotusScript Development Environment:2:5:(Options):0:66
  549. '++LotusScript Development Environment:2:5:(Forward):0:1
  550. Declare Sub Exiting(Source As Field)
  551. Declare Sub Entering(Source As Field)
  552. '++LotusScript Development Environment:2:5:(Declarations):0:2
  553. '++LotusScript Development Environment:2:2:BindEvents:1:129
  554. Private Sub BindEvents(Byval Objectname_ As String)
  555.      Static Source As FIELD
  556.      Set Source = Bind(Objectname_)
  557.      On Event Exiting From Source Call Exiting
  558.      On Event Entering From Source Call Entering
  559. End Sub
  560. '++LotusScript Development Environment:2:2:Exiting:1:12
  561. Sub Exiting(Source As Field)
  562.      
  563. End Sub
  564. '++LotusScript Development Environment:2:2:Entering:1:12
  565. Sub Entering(Source As Field)
  566.      HPvalue = uidoc.fieldgettext("OpenURL")
  567.      OldHPValue = HPvalue
  568. End Sub
  569. '++LotusScript Development Environment:2:5:(Options):0:66
  570. '++LotusScript Development Environment:2:5:(Forward):0:1
  571. Declare Sub Exiting(Source As Field)
  572. '++LotusScript Development Environment:2:5:(Declarations):0:2
  573. '++LotusScript Development Environment:2:2:BindEvents:1:129
  574. Private Sub BindEvents(Byval Objectname_ As String)
  575.      Static Source As FIELD
  576.      Set Source = Bind(Objectname_)
  577.      On Event Exiting From Source Call Exiting
  578. End Sub
  579. '++LotusScript Development Environment:2:2:Exiting:1:12
  580. Sub Exiting(Source As Field)
  581.      
  582. End Sub
  583. '++LotusScript Development Environment:2:5:(Options):0:66
  584. '++LotusScript Development Environment:2:5:(Forward):0:1
  585. Declare Sub Entering(Source As Field)
  586. Declare Sub Exiting(Source As Field)
  587. '++LotusScript Development Environment:2:5:(Declarations):0:2
  588. '++LotusScript Development Environment:2:2:BindEvents:1:129
  589. Private Sub BindEvents(Byval Objectname_ As String)
  590.      Static Source As FIELD
  591.      Set Source = Bind(Objectname_)
  592.      On Event Entering From Source Call Entering
  593.      On Event Exiting From Source Call Exiting
  594. End Sub
  595. '++LotusScript Development Environment:2:2:Entering:1:12
  596. Sub Entering(Source As Field)
  597.      Searchvalue = uidoc.fieldgettext("PreferredSearchEngine")
  598.      OldSearchValue = Searchvalue
  599. End Sub
  600. '++LotusScript Development Environment:2:2:Exiting:1:12
  601. Sub Exiting(Source As Field)
  602.      
  603. End Sub
  604. '++LotusScript Development Environment:2:5:(Options):0:66
  605. '++LotusScript Development Environment:2:5:(Forward):0:1
  606. Declare Sub Exiting(Source As Field)
  607. '++LotusScript Development Environment:2:5:(Declarations):0:2
  608. '++LotusScript Development Environment:2:2:BindEvents:1:129
  609. Private Sub BindEvents(Byval Objectname_ As String)
  610.      Static Source As FIELD
  611.      Set Source = Bind(Objectname_)
  612.      On Event Exiting From Source Call Exiting
  613. End Sub
  614. '++LotusScript Development Environment:2:2:Exiting:1:12
  615. Sub Exiting(Source As Field)
  616.      Dim  w As New notesuiworkspace
  617.      Dim uidoc As notesuidocument
  618.      Dim docnote As notesdocument
  619.      Set uidoc = w.currentdocument
  620.      uidoc.refresh
  621.      Set docnote = uidoc.document
  622.      If "" <> (uidoc.fieldgettext("*")) Then
  623.           var = docnote.GetItemValue("*")
  624.           Forall item In var
  625.                If Not (item = "*") Then
  626.                     uidoc.fieldclear(item)
  627.                End If
  628.           End Forall
  629.      End If     
  630. End Sub
  631. DiskSizeOptions
  632. ReduceReadG
  633.     0S0E
  634. Internet Options for
  635.     0S0E
  636. DisplayName
  637.     Startup options:
  638. StartUpOptionsCheck this box to specify a default Web page each time you open this database.
  639. Open home page on database open:|1
  640. http://notes.net/welcome.nsf
  641. startupoptions
  642. OpenURL
  643. You have selected to have a home page opened every time the database is opened.  Please enter a home page in the home page field.
  644.     5S6S9S10SOpenURLEnter the URL for the Web page you want to open each time you open this database.
  645.       Database size options:
  646. ReduceDays
  647.     1S2S
  648. ReduceNumDaysSelect the number of days that a page should be in the database before Notes purges it.
  649. 15306090
  650. ReduceNumMBSelect the size the database should reach before Notes warns you.
  651. 5102550
  652.     days
  653.     megabytes
  654.      Collaboration options:
  655.     Share specified Web pages and Rating documents with:
  656.     Server:
  657.     Database:
  658. web.nsf
  659. WebServer
  660. web.nsf
  661. WebServer
  662. names.nsf
  663. ($ServersLookup)
  664. WebServer
  665. WebDBName
  666.     0S0E
  667. WebDatabaseSpecify the name of the Server Web Navigator database to share Web pages and Ratings documents with.
  668. Underline/Blue
  669. Anchor_styleChoose a style for URLs on Web pages.
  670. Bold/Underline/BlueUnderline/BlueBold/BlueUnderline only
  671. Times 12
  672. BodyChoose a font for the body tag on Web pages.    
  673. Times 10Times 11Times 12Helvetica 10Helvetica 11Helvetica 12Courier 10Courier 11Courier 12
  674. Courier
  675. FixedChoose a font for tags that display "fixed" type on Web pages.
  676. TimesHelveticaCourier
  677. Courier
  678. PlainChoose a font for plaintext type tags on Web pages.
  679. TimesHelveticaCourier
  680. Times
  681. AddressChoose a font for the address tag on Web pages.
  682. TimesHelveticaCourier
  683. Courier
  684. ListingChoose a font for listing type tags on Web pages.
  685. TimesHelveticaCourier
  686.      Presentation preferences:
  687.     Anchors:
  688.     Body text:
  689.     Fixed:
  690.     Plain:
  691.     Address:
  692.     Listing:
  693.      Network preferences:
  694.     Internet Network Preferences can be set by editing your current location document.
  695.     0S0E
  696.     Edit Location...
  697.     Search for updates every:
  698. SearchFrequencyChoose how often you want the agent to check to see if the contents of the page have changed.
  699. Hour|04 Hours|1Day|2Week|3
  700.     When updates are found:
  701. UpdatesFoundOptionsSpecify how you want to be alerted when the contents of the page changes.
  702. Mail the actual page|0Send me a summary|1
  703.     Send to:
  704.     0S0E
  705. Page Minder
  706. sendmailto
  707. You must enter an e-mail address for Page Minder to send updates to.{
  708.     1S6S7S9S10S13S
  709. SendMailToSpecify the name of the person to alert when the contents of the page changes.
  710.     Preload Web pages:
  711. ScanAheadEnter the number of levels of pages you want this agent to retrieve.
  712.     level(s) ahead
  713.     Preferred Search Engine:
  714. PreferredSearchEngineSpecify the search engine you want to use when you click the Search button.
  715. AltaVista|0Excite|1Lycos|2Yahoo|3CNet|4Other|5
  716. PreferredSearchEngine
  717.     1S2S
  718. PreferredSearchEngine
  719. http://altavista.digital.com/
  720. PreferredSearchEngine
  721. http://www.excite.com/
  722. PreferredSearchEngine
  723. http://www.lycos.com/
  724. PreferredSearchEngine
  725. http://www.yahoo.com/
  726. PreferredSearchEngine
  727. http://www.search.com/
  728. PreferredSearchEngine
  729. SearchURL
  730. http://
  731.     3S4S5S6S7S8S9S10S11S12S13S14S15S16S17S18S19S20S21S22S23S24S25S26S27S28S33S34S35S36S38S
  732. SearchURLEnter the URL of a specific search engine you want to associate with the Search button.
  733.      Search options:
  734.      Page Minder agent preferences:
  735.      Web Ahead agent preferences:
  736. ReduceDaysChoose how you want Notes to purge the database.
  737. Reduce full pages to links if not read within:|0Remove pages from database if not read in:|1Disable|2
  738. ReduceSizeSpecify that Notes should warn you by displaying a message box when the database exceeds a certain size.
  739. Warn me when the database exceeds:|1
  740. Web Ahead
  741.     0S0E
  742. Web Ahead
  743.     0S0E
  744.     0R4S
  745. Enabled Background Agents
  746. You have just enabled a background agent on your Notes workstation.  Please make sure that you have enabled background agents in your Notes preferences by choosing File - Tools - User Preferences and selecting Enable scheduled local agents.
  747.     0R6S
  748.     Enable Web Ahead
  749. Page Minder
  750.     0S0E
  751. Page Minder
  752.     0S0E
  753.     0R4S
  754. Enabled Background Agents
  755. You have just enabled a background agent on your Notes workstation.  Please make sure that you have enabled background agents in your Notes preferences by choosing File - Tools - User Preferences and selecting Enable scheduled local agents.
  756.     0R6S
  757.     Enable Page Minder
  758. SaveHTMLCheck to save the source HTML text in the HTMLSource field in the Notes document.
  759. Save HTML in Note?|1
  760.     Home Page:
  761. SendMailTo
  762. SendMailTo
  763.     1S2S3S10S11S
  764.     0S0E
  765.     Address...
  766. Page Minder
  767.     0S0E
  768. Page Minder
  769.     0S0E
  770.     Disable Page Minder
  771. Web Ahead
  772.     0S0E
  773. Web Ahead
  774.     0S0E
  775.     Disable Web Ahead
  776.     0S0E
  777. WebServerPlease enter the name of the InterNotes Server which you would like to share web pages with
  778. Housekeeping
  779. reducedays
  780.     0S0E
  781. Housekeeping
  782.     0S0E
  783.     Disable Housekeeping 
  784. Housekeeping
  785. reducedays
  786.     0S0E
  787. Housekeeping
  788.     0S0E
  789.      Enable Housekeeping 
  790.     0S0E
  791. KeepPage
  792. Automatically store pages for disconnected use|0Manually store pages for disconnected use|1
  793. $Script1
  794. Categori_zeK
  795. _Edit Document
  796. Send Docu_ment
  797. _Forward
  798. _Move To Folder...
  799. _Remove From FolderK
  800. Close
  801.     0S0E
  802. Save 
  803.     0S0E
  804. O=Lotus Notes
  805. O=Lotus Notes
  806. PURSAFO
  807. |.:#U
  808. O=Lotus Notes
  809. CN=Lotus Notes Template Development/O=Lotus Notes
  810. PURSAFO
  811. Fde!f^^
  812. $TITLE
  813. $INFO
  814. $WINDOWTITLE
  815. $Script
  816. $$Script_O
  817. $$ScriptName
  818. $$FormScript
  819. $$$FormScript_O
  820. $$StartUpOptions
  821. $StartUpOptions_O
  822. $$OpenURL
  823. $OpenURL_O
  824. $$ScanAhead
  825. $ScanAhead_O
  826. $$PreferredSearchEngine
  827. $PreferredSearchEngine_O
  828. $$$Script1
  829. $$Script1_O
  830. $BODY
  831. $ACTIONS
  832. Categori_ze0
  833. _Edit Document
  834. Send Docu_ment
  835. _Forward
  836. _Move To Folder...
  837. _Remove From Folder
  838. O=Lotus Notes
  839. O=Lotus Notes
  840. PURSAFO
  841. |.:#U
  842. O=Lotus Notes
  843. CN=Lotus Notes Template Development/O=Lotus Notes
  844. PURSAFO
  845. Fde!f^^
  846. ML(_}
  847. $TITLE
  848. $Index
  849. $Formula
  850. $FormulaClass
  851. $VIEWFORMAT
  852. $Comment
  853. $ACTIONS
  854. Categori_zeK
  855. _Edit Document
  856. Send Docu_ment
  857. _Forward
  858. _Move to Folder...
  859. _Remove from Folder...
  860. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  861. '++LotusScript Development Environment:2:5:(Forward):0:1
  862. Declare Sub Click(Source As Button)
  863. '++LotusScript Development Environment:2:5:(Declarations):0:2
  864. '++LotusScript Development Environment:2:2:BindEvents:1:129
  865. Private Sub BindEvents(Byval Objectname_ As String)
  866.      Static Source As BUTTON
  867.      Set Source = Bind(Objectname_)
  868.      On Event Click From Source Call Click
  869. End Sub
  870. '++LotusScript Development Environment:2:2:Click:1:12
  871. Sub Click(Source As Button)
  872.      
  873.      Browse
  874. End Sub
  875. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  876. '++LotusScript Development Environment:2:5:(Forward):0:1
  877. Declare Sub Click(Source As Button)
  878. '++LotusScript Development Environment:2:5:(Declarations):0:2
  879. '++LotusScript Development Environment:2:2:BindEvents:1:129
  880. Private Sub BindEvents(Byval Objectname_ As String)
  881.      Static Source As BUTTON
  882.      Set Source = Bind(Objectname_)
  883.      On Event Click From Source Call Click
  884. End Sub
  885. '++LotusScript Development Environment:2:2:Click:1:12
  886. Sub Click(Source As Button)
  887.      
  888.      ViewDelete
  889. End Sub
  890. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  891. '++LotusScript Development Environment:2:5:(Forward):0:1
  892. Declare Sub Click(Source As Button)
  893. '++LotusScript Development Environment:2:5:(Declarations):0:2
  894. '++LotusScript Development Environment:2:2:BindEvents:1:129
  895. Private Sub BindEvents(Byval Objectname_ As String)
  896.      Static Source As BUTTON
  897.      Set Source = Bind(Objectname_)
  898.      On Event Click From Source Call Click
  899. End Sub
  900. '++LotusScript Development Environment:2:2:Click:1:12
  901. Sub Click(Source As Button)
  902.      
  903.      PrintWebDocument
  904. End Sub
  905. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  906. '++LotusScript Development Environment:2:5:(Forward):0:1
  907. Declare Sub Click(Source As Button)
  908. '++LotusScript Development Environment:2:5:(Declarations):0:2
  909. '++LotusScript Development Environment:2:2:BindEvents:1:129
  910. Private Sub BindEvents(Byval Objectname_ As String)
  911.      Static Source As BUTTON
  912.      Set Source = Bind(Objectname_)
  913.      On Event Click From Source Call Click
  914. End Sub
  915. '++LotusScript Development Environment:2:2:Click:1:12
  916. Sub Click(Source As Button)
  917.      
  918.      Dim docLocal As NotesDocument
  919.      Dim docCollection As NotesDocumentCollection     
  920.      Set docCollection = db.UnprocessedDocuments
  921.      If (docCollection.Count = 0) Then
  922.           Msgbox "You must select a document.",16,"Error"
  923.           Exit Sub
  924.      Else
  925.           For j = 1 To docCollection.Count
  926.                Set docLocal = docCollection.getnthdocument(j)               
  927.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  928.                     Select Case docLocal.ForwardOptions(0)
  929.                     Case "1" : 'user wants to forward the URL only
  930.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  931.                     Case "2" : 'user wants to send entire page
  932.                          Call  ViewForward(docLocal)
  933.                     End Select
  934.           'remove any remaining fields that don't need to be carried around
  935.                     docLocal.RemoveItem "ForwardOptions" 
  936.                     docLocal.save True, False
  937.                     
  938.                End If
  939.                Exit Sub
  940.           Next
  941.      End If
  942.      Exit Sub
  943. End Sub
  944. '++LotusScript Development Environment:2:5:(Options):0:74
  945. Option Public
  946. Use "InternetFunctions"
  947. '++LotusScript Development Environment:2:5:(Forward):0:1
  948. '++LotusScript Development Environment:2:5:(Declarations):0:2
  949. '++LotusScript Development Environment:2:5:(Options):0:66
  950. '++LotusScript Development Environment:2:5:(Forward):0:1
  951. Declare Sub Postopen(Source As Notesuiview)
  952. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  953. '++LotusScript Development Environment:2:5:(Declarations):0:2
  954. '++LotusScript Development Environment:2:2:BindEvents:1:129
  955. Private Sub BindEvents(Byval Objectname_ As String)
  956.      Static Source As NOTESUIVIEW
  957.      Set Source = Bind(Objectname_)
  958.      On Event Postopen From Source Call Postopen
  959.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  960. End Sub
  961. '++LotusScript Development Environment:2:2:Postopen:1:12
  962. Sub Postopen(Source As Notesuiview)
  963.      InstantiateObjects
  964. End Sub
  965. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  966. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  967.      Call MoveToFolder(source,target,continue)
  968. End Sub
  969. O=Lotus Notes
  970. O=Lotus Notes
  971. PURSAFO
  972. |.:#U
  973. O=Lotus Notes
  974. CN=Lotus Notes Template Development/O=Lotus Notes
  975. PURSAFO
  976. Fde!f^^
  977. $SCRIPTOBJ_10
  978. $TITLE
  979. $Index
  980. $Formula
  981. $FormulaClass
  982. $Totals
  983. $VIEWFORMAT
  984. $Comment
  985. $ACTIONS
  986. $SCRIPTOBJ_6
  987. $SCRIPTOBJ_7
  988. $SCRIPTOBJ_8
  989. $SCRIPTOBJ_9
  990. $ViewGlobalScript
  991. $ViewGlobalScript_O
  992. $ViewScript
  993. $ViewScript_O
  994. '++LotusScript Development Environment:2:5:(Options):0:74
  995. Use "InternetFunctions"
  996. '++LotusScript Development Environment:2:5:(Forward):0:1
  997. Declare Sub Postopen(Source As Notesuidatabase)
  998. Declare Sub PerformWebSetup
  999. Declare Sub ReduceDocumentsToLinks
  1000. Declare Sub RemoveDocumentsFromDatabase
  1001. Declare Function DocumentCanBeProcessed  As Integer
  1002. Declare Sub SetupExpirationDates
  1003. Declare Sub ReduceOneDocumentToLink
  1004. Declare Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
  1005. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1006. 'Active_X_Personal_Web_Navigator: 
  1007. Dim docCollection As NotesDocumentCollection
  1008. Dim urldoc As NotesDocument
  1009. Dim doc As NotesDocument
  1010. Dim dtExpiration As NotesDateTime
  1011. Dim dtLastAccessed As NotesDateTime
  1012. Dim hskpgagent As NotesAgent
  1013. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1014. Private Sub BindEvents(Byval Objectname_ As String)
  1015.      Static Source As NOTESUIDATABASE
  1016.      Set Source = Bind(Objectname_)
  1017.      On Event Postopen From Source Call Postopen
  1018.      On Event Queryclose From Source Call Queryclose
  1019. End Sub
  1020. '++LotusScript Development Environment:2:2:Postopen:1:12
  1021. Sub Postopen(Source As Notesuidatabase)
  1022.      'intialize variables
  1023.      InstantiateObjects
  1024.      Dim BrowserDoc As notesdocument
  1025.      Dim BrowserobjectCollection As notesdocumentcollection
  1026.      Dim iedoc As New notesdocument(db)
  1027.      Dim BrowserOption As Variant
  1028.      Dim dt As New notesdatetime ("1/1/90")
  1029.      
  1030.      On Error 4005 Goto LoadHomeURL
  1031.      
  1032.      
  1033.      'Get current location retriever value
  1034.      BrowserOption = GetLocationItem("WebRetriever")
  1035.      
  1036.      
  1037.      'ensure that the user's profile document exists
  1038.      
  1039.      If (docprofile Is Nothing) Then 
  1040.           PerformWebSetup    
  1041.           'Get the current folders in the database for future use by the bookmark function
  1042.           Goto LoadHomeURL
  1043.      Else
  1044.           'Get the current folders in the database for future use by the bookmark function
  1045.           If (docprofile.ReduceDays(0) <> "2") Then
  1046.                Set hskpgagent = db.getagent("Housekeeping")
  1047.                If Not(hskpgagent.IsEnabled) Then                
  1048.                     Msgbox "You have specified that you would like to reduce the unread pages in your Personal"  _
  1049.                     + "Web Database.  Please select Actions - Internet Options to enable the housekeeping " _
  1050.                     + "agent which will perform this task nightly at 1:00 AM.", 16,"Enable Housekeeping Agent"    
  1051.                End If
  1052.           End If
  1053.           
  1054.           If (docprofile.ReduceSize(0) = "1") Then
  1055.                'compare the current database size against the limit set in the user profile
  1056.                If (db.Size > Cdbl(docprofile.ReduceNumMB(0)) *  1048576) Then Msgbox "The size of this database exceeds the user specified amount of "_
  1057.                & docprofile.ReduceNumMB(0) & "MB.",16,"Internet Options"
  1058.           End If
  1059.           
  1060.           'open up the user's home page if they have specified one 
  1061.           If (docprofile.StartUpOptions(0) = "1") Then
  1062. LoadHomeURL: 
  1063.                If BrowserOption(0) = "3" Then
  1064.                     CheckRegistrySettings
  1065.                     Set BrowserObjectCollection = db.search(("Form = ""WebBrowserForm""& home = ""1"""), dt, 0)
  1066.                     
  1067.                     If BrowserObjectCollection.count <> 0 Then
  1068.                          Set BrowserDoc = BrowserObjectCollection.getfirstdocument
  1069.                          Call BrowserDoc.replaceitemvalue("url", docprofile.openurl(0))
  1070.                          Call BrowserDoc.save(True, False)
  1071.                          Call w.editdocument(False, browserdoc)                         
  1072.                     Else
  1073.                          Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  1074.                          Call iedoc.replaceitemvalue("home", "1")
  1075.                          Call iedoc.replaceitemvalue("SaveOptions", "1")
  1076.                          Call ieDoc.replaceitemvalue("url", docprofile.openurl(0))
  1077.                          Call ieDoc.save(True,False)
  1078.                          Call w.viewrefresh
  1079.                          Call w.editdocument(False, iedoc)
  1080.                     End If
  1081.                Elseif BrowserOption(0) = "0" Then
  1082.                     w.URLOpen docprofile.OpenURL(0)
  1083.                End If
  1084.           End If
  1085.      End If
  1086. End Sub
  1087. '++LotusScript Development Environment:2:2:PerformWebSetup:1:8
  1088. Sub PerformWebSetup
  1089.                'create the new document with default settings
  1090.      Set docprofile = New NotesDocument(db)
  1091.      docprofile.Form = "Admin"
  1092.      docprofile.StartUpOptions = "1"
  1093.      docprofile.OpenURL = "http://notes.net/welcome.nsf"
  1094.      docprofile.PreferredSearchEngine = "4"
  1095.      docprofile.SearchURL="http://www.search.com/"
  1096.      docprofile.ScanAhead = "1"
  1097.      docprofile.SearchFrequency = "2"
  1098.      docprofile.UpdatesFoundOptions = "1"
  1099.      docprofile.SendMailTo = session.UserName
  1100.      docprofile.ReduceDays = "2"
  1101.      docprofile.KeepPage = "0"
  1102.      docprofile.Save True, True
  1103. End Sub
  1104. '++LotusScript Development Environment:2:2:ReduceDocumentsToLinks:1:8
  1105. Sub ReduceDocumentsToLinks
  1106.      SetupExpirationDates
  1107.      
  1108.      Set docCollection = db.AllDocuments
  1109.      Set doc = docCollection.GetFirstDocument
  1110.      While Not (doc Is Nothing)
  1111.           If (DocumentCanBeProcessed) Then ReduceOneDocumentToLink
  1112.           Set doc = docCollection.GetNextDocument(doc)
  1113.      Wend
  1114. End Sub
  1115. '++LotusScript Development Environment:2:2:RemoveDocumentsFromDatabase:1:8
  1116. Sub RemoveDocumentsFromDatabase
  1117.      SetupExpirationDates
  1118.      
  1119.      Set docCollection = db.AllDocuments
  1120.      For i = 1 To docCollection.Count
  1121.           Set doc = docCollection.GetNthDocument(i)          
  1122.           If (DocumentCanBeProcessed) Then 
  1123.                Print "Removing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days..."
  1124.                doc.Remove True
  1125.           End If               
  1126.      Next
  1127. End Sub
  1128. '++LotusScript Development Environment:2:1:DocumentCanBeProcessed:1:8
  1129. Function DocumentCanBeProcessed  As Integer
  1130. 'determines if a document meets the criteria to be reduced or removed from the database
  1131.      If (doc.Form(0) = "Admin") Then 
  1132.           DocumentCanBeProcessed = False
  1133.           Exit Function
  1134.      End If
  1135. 'if this is the home page, do not process it
  1136.      If (doc.Url(0) = docprofile.OpenUrl(0)) Then
  1137.           DocumentCanBeProcessed = False
  1138.           Exit Function          
  1139.      End If
  1140. 'compare the last accessed date/time
  1141.      dtLastAccessed.LSLocalTime = doc.LastAccessed
  1142.      If (dtExpiration.TimeDifference(dtLastAccessed) > 0) Then DocumentCanBeProcessed = True
  1143. End Function
  1144. '++LotusScript Development Environment:2:2:SetupExpirationDates:1:8
  1145. Sub SetupExpirationDates
  1146. 'initiate the date/time objects
  1147.      Set dtLastAccessed = New NotesDateTime("")
  1148.      Set dtExpiration = New NotesDateTime("")
  1149.      dtLastAccessed.SetNow
  1150.      dtExpiration.SetNow
  1151. 'dtExpired must be set back the number of days specified in the profile document
  1152.      dtExpiration.AdjustDay(-1*Cint(docprofile.ReduceNumDays(0)))
  1153. End Sub
  1154. '++LotusScript Development Environment:2:2:ReduceOneDocumentToLink:1:8
  1155. Sub ReduceOneDocumentToLink
  1156.      Print "Reducing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days..."
  1157.      doc.RemoveItem "Body"
  1158.      doc.RemoveItem "HTMLSouce"
  1159.      doc.RemoveItem "HTMLBody"
  1160.      doc.RemoveItem "$Background"
  1161.      doc.RemoveItem "$FILE"
  1162.      doc.RemoveItem "URLLinks1"
  1163.      doc.RemoveItem "WebAheadStatus"
  1164.      doc.RemoveItem "WebAgentError"
  1165.      doc.RemoveItem "PageMinderStatus"
  1166.      doc.Save True,True
  1167. End Sub
  1168. '++LotusScript Development Environment:2:2:Queryclose:1:12
  1169. Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
  1170.      
  1171. End Sub
  1172. x    x    $
  1173. O=Lotus Notes
  1174. O=Lotus Notes
  1175. PURSAFO
  1176. |.:#U
  1177. O=Lotus Notes
  1178. CN=Lotus Notes Template Development/O=Lotus Notes
  1179. PURSAFO
  1180. Fde!f^^
  1181. &5vZn
  1182. $DBScript
  1183. $DBScript_O
  1184. $TITLE
  1185. $Flags
  1186. $PublicAccess
  1187.  ShareWebPage
  1188. SharedOptions
  1189.     1S2S
  1190.     This Web page will be copied to the following Web Navigator database (the location of the Web Navigator database can be changed by choosing Actions - Internet Options from the menu)
  1191. Rating
  1192. SharedOptions
  1193.     3S4S5S6S
  1194. Rating
  1195. Rating
  1196. Rating
  1197. Rating
  1198. SharedOptions
  1199.     3S4S5S6S
  1200. Rating
  1201. Rating
  1202. Rating
  1203. Rating
  1204. SharedOptions
  1205.     3S4S5S6S
  1206. Rating
  1207. Rating
  1208. Rating
  1209. Rating
  1210. SharedOptions
  1211.     3S4S5S6S
  1212. Rating
  1213. Rating
  1214. Rating
  1215. Rating
  1216. SharedOptions
  1217.     3S4S5S6S
  1218. Rating
  1219. Rating
  1220. Rating
  1221. Rating
  1222. SharedOptions
  1223.     3S4S5S6S
  1224. Rating
  1225. Rating
  1226. Rating
  1227. Rating
  1228. SharedOptions
  1229.     3S4S5S6S
  1230. Rating
  1231. Rating
  1232. Rating
  1233. Rating
  1234. SharedOptions
  1235.     3S4S5S6S
  1236. Rating
  1237. Rating
  1238. Rating
  1239. Rating
  1240. SharedOptions
  1241.     3S4S5S6S
  1242. Rating
  1243. Rating
  1244. Rating
  1245. Rating
  1246. SharedOptions
  1247.     3S4S5S6S
  1248. Rating
  1249. Rating
  1250. Rating
  1251. SharedOptions
  1252.     1S2S
  1253. Title
  1254. Title
  1255. Poor   < ------------------------------  >   Great!
  1256. contentSelect category from list that best describes contents of this document
  1257. ArtsBusinessComputersCultureEducationEntertainmentFinanceGovernmentInternetPublicationsRecreationReferenceScienceShoppingSports
  1258. Category:
  1259. CommentsWrite your descriptive comments about the page here!
  1260. Your comments:
  1261. SharedOptions
  1262. Copy page to shared Web Navigator database|2Create Rating in shared Web Navigator database|3
  1263. SharedOptions
  1264.     1S2S
  1265.     Send URL to:
  1266. tmpWebServer
  1267. tmpWebServer
  1268. tmpWebDb
  1269. tmpWebDb
  1270.     Server:
  1271.     Path:
  1272. SharedOptions
  1273. Rating
  1274. You must enter a rating for this page.{
  1275.     3S4S5S6S7S8S
  1276. Rating
  1277. O=Lotus Notes
  1278. O=Lotus Notes
  1279. PURSAFO
  1280. |.:#U
  1281. O=Lotus Notes
  1282. CN=Lotus Notes Template Development/O=Lotus Notes
  1283. PURSAFO
  1284. Fde!f^^
  1285. P(N.`
  1286. $TITLE
  1287. $INFO
  1288. $$Script_O
  1289. $$ScriptName
  1290. $BODY
  1291. '++LotusScript Development Environment:2:5:(Options):0:74
  1292. Option Public
  1293. '++LotusScript Development Environment:2:5:(Forward):0:1
  1294. Declare Sub Initialize
  1295. Declare Sub ExtractHTTPAddress(szEntry As String) 
  1296. Declare Sub CreateBookmarkDocument
  1297. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1298. Dim ws As NotesUIWorkspace
  1299. Dim session As NotesSession
  1300. Dim db As NotesDatabase
  1301. Dim bookmark As NotesDocument
  1302. Dim note As NotesDocument
  1303. Dim hFile As Integer
  1304. Dim szPath As String
  1305. Dim szEntry As String
  1306. Dim szURL As String
  1307. Dim szTitle As String
  1308. '++LotusScript Development Environment:2:2:Initialize:1:10
  1309. Sub Initialize
  1310.      
  1311. End Sub
  1312. '++LotusScript Development Environment:2:2:ExtractHTTPAddress:1:8
  1313. Sub ExtractHTTPAddress(szEntry As String) 
  1314.      Dim posHTTPBegin As Integer
  1315.      Dim posHTTPEnd As Integer
  1316.      Dim posTITLEBegin As Integer
  1317.      Dim posTITLEEnd As Integer
  1318.      
  1319. 'first, get the position of an HTTP referece
  1320.      posHTTPBegin = Instr(1,szEntry,"http",5)
  1321.      If (posHTTPBegin = 0) Then 
  1322.           szURL = ""
  1323.           Exit Sub
  1324.      Else
  1325. 'get the position of the closing quote
  1326.           posHTTPEnd = Instr(posHTTPBegin,szEntry,"/""",5)
  1327.           szURL = Mid$(szEntry,posHTTPBegin,(posHTTPEnd-posHTTPBegin)+1)
  1328. 'now, we need to get the title
  1329.           posTITLEBegin = Instr(posHTTPEnd,szEntry,">",5)
  1330.           If (posTITLEBegin = 0) Then
  1331.                szTitle = ""
  1332.           Else
  1333.                posTITLEEnd = Instr(posTITLEBegin,szEntry,"</a",5)
  1334.                szTitle = Mid$(szEntry,posTITLEBegin+1,(posTITLEEnd-posTITLEBegin)-1)               
  1335.           End If
  1336.      End If   
  1337. End Sub
  1338. '++LotusScript Development Environment:2:2:CreateBookmarkDocument:1:8
  1339. Sub CreateBookmarkDocument
  1340.      
  1341.      Set bookmark = New NotesDocument(db)
  1342.      
  1343.      bookmark.URL = szURL
  1344.      bookmark.Form = "HTMLForm"
  1345.      bookmark.Title = szTitle
  1346.      bookmark.Subject = szTitle
  1347.      bookmark.Imported = True     
  1348.      Call bookmark.Save(True,True,True)
  1349.      Call bookmark.PutInFolder("My Bookmarks")
  1350.      
  1351. End Sub
  1352. (ImportBookmark)'++LotusScript Development Environment:2:5:(Options):0:66
  1353. '++LotusScript Development Environment:2:5:(Forward):0:1
  1354. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1355. Declare Sub Postopen(Source As Notesuidocument)
  1356. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1357. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1358. Private Sub BindEvents(Byval Objectname_ As String)
  1359.      Static Source As NOTESUIDOCUMENT
  1360.      Set Source = Bind(Objectname_)
  1361.      On Event Queryopen From Source Call Queryopen
  1362.      On Event Postopen From Source Call Postopen
  1363. End Sub
  1364. '++LotusScript Development Environment:2:2:Queryopen:1:12
  1365. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1366.      
  1367. End Sub
  1368. '++LotusScript Development Environment:2:2:Postopen:1:12
  1369. Sub Postopen(Source As Notesuidocument)
  1370.      Set ws = New NotesUIWorkspace
  1371.      Set session = New NotesSession
  1372.      Set db = session.CurrentDatabase
  1373.      Set note = source.Document
  1374. End Sub
  1375.     Netscape Bookmark file:
  1376. BookmarkFile
  1377. bookmarkfile
  1378. Choose path for Netscape Bookmarks
  1379.     1S2S
  1380.     Browse...
  1381.     For example, C:\NETSCAPE\NAVIGATOR\BOOKMARK.HTM
  1382. O=Lotus Notes
  1383. O=Lotus Notes
  1384. PURSAFO
  1385. |.:#U
  1386. O=Lotus Notes
  1387. CN=Lotus Notes Template Development/O=Lotus Notes
  1388. PURSAFO
  1389. Fde!f^^
  1390. c'qTXCl
  1391. $TITLE
  1392. $INFO
  1393. $Script
  1394. $$Script_O
  1395. $$ScriptName
  1396. $$FormScript
  1397. $$$FormScript_O
  1398. $BODY
  1399. (ImportFavorite)
  1400.     Microsoft Favorites Directory or filename:
  1401. BookmarkFile
  1402.     For example, C:\WIN95\PROFILES\USERNAME\FAVORITES
  1403. bookmarkfile
  1404. Choose path for Microsoft Favorite
  1405.     1S2S
  1406.     Browse...
  1407. O=Lotus Notes
  1408. O=Lotus Notes
  1409. PURSAFO
  1410. |.:#U
  1411. O=Lotus Notes
  1412. CN=Lotus Notes Template Development/O=Lotus Notes
  1413. PURSAFO
  1414. Fde!f^^
  1415. $TITLE
  1416. $INFO
  1417. $$ScriptName
  1418. $BODY
  1419. Internet Options
  1420.     0S0E
  1421. O=Lotus Notes
  1422. O=Lotus Notes
  1423. PURSAFO
  1424. |.:#U
  1425. O=Lotus Notes
  1426. CN=Lotus Notes Template Development/O=Lotus Notes
  1427. PURSAFO
  1428. Fde!f^^
  1429. $TITLE
  1430. $Formula
  1431. $Type
  1432. $Operation
  1433. $Scan
  1434. D1DE5FB167B5A71A831BA6EC2E9C9C3667843E4301C6054E658E2C2D65E5AC9DHTMLFormDC
  1435. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#################################
  1436. Favorites and Bookmarks|Bookmarks|Favorites|BookmarksFavorites and Bookmarks|Bookmarks|Favorites|Bookmarks
  1437. Bookmark
  1438.     6S8S
  1439. $37Title$36URL$Conflict
  1440. Title
  1441. Title
  1442. Bookmark
  1443.     6S8S
  1444. TitlePageTitle$36Date
  1445. URLURL&
  1446. Admin
  1447. Admin
  1448. forward
  1449. HTMLForm
  1450. WebBrowserForm
  1451.     12S13S
  1452. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  1453. ##########################################################
  1454. ForwardForwardCD
  1455. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###################
  1456. EXT61806.lssKJ
  1457. EXT61806.lso
  1458. EXT34422.lss
  1459. EXT34422.lsoW7K
  1460. STG27910
  1461. EXT34422
  1462. EXT34422Browser$BodyWebBrowserFormCAF31E53E5407F8584AE8B898DDBFC3CD
  1463. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes2389A0729986E27BD9B4F21C755636E467843E4301C6054E658E2C2D65E5AC9DCN=Lotus Notes Template Development/O=Lotus Notes###################
  1464. J7)e`|qT
  1465. Housekeeping
  1466. 1SfL3
  1467. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##########################################################
  1468. ##########################################################
  1469. ##########################################################
  1470. WebRefreshFailed
  1471. Refresh of 
  1472. Title
  1473.  failed
  1474. Title
  1475. Host"
  1476.     3S4S9S10S15S16S
  1477. &Arial
  1478. '++LotusScript Development Environment:2:5:(Options):0:74
  1479. Option Public
  1480. Use "InternetFunctions"
  1481. '++LotusScript Development Environment:2:5:(Forward):0:1
  1482. Declare Sub Initialize
  1483. Declare Sub InstantiateFormObjects
  1484. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1485. Dim uidoc As NotesUIDocument
  1486. Dim doc As NotesDocument
  1487. '++LotusScript Development Environment:2:2:Initialize:1:10
  1488. Sub Initialize
  1489.      
  1490. End Sub
  1491. '++LotusScript Development Environment:2:2:InstantiateFormObjects:1:8
  1492. Sub InstantiateFormObjects
  1493. 'call the global instantiate objects     
  1494.      InstantiateObjects
  1495.      Set uidoc = w.CurrentDocument    
  1496.      Set doc = uidoc.Document     
  1497. End Sub
  1498. HTMLForm'++LotusScript Development Environment:2:5:(Options):0:66
  1499. '++LotusScript Development Environment:2:5:(Forward):0:1
  1500. Declare Sub Postopen(Source As Notesuidocument)
  1501. Declare Sub Terminate
  1502. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1503. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1504. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1505. Private Sub BindEvents(Byval Objectname_ As String)
  1506.      Static Source As NOTESUIDOCUMENT
  1507.      Set Source = Bind(Objectname_)
  1508.      On Event Postopen From Source Call Postopen
  1509.      On Event Queryopen From Source Call Queryopen
  1510. End Sub
  1511. '++LotusScript Development Environment:2:2:Postopen:1:12
  1512. Sub Postopen(Source As Notesuidocument)
  1513.      Dim doc As notesdocument
  1514.      Dim w As New notesuiworkspace
  1515.      Dim locationdoc As notesdocument
  1516.      Dim BrowserObjectCollection As notesdocumentcollection
  1517.      Dim dt As New notesdatetime ("1/1/90")
  1518.      Dim BrowserDoc As notesdocument
  1519.      source.refreshhideformulas
  1520. 'If we are in the process of forwarding the document, don't open it with the web browser form.     
  1521.      
  1522.      If source.document.forward(0) = "1" Then
  1523.           Exit Sub
  1524.      End If
  1525.      
  1526.      If Not (source.inpreviewpane)  Then
  1527.           InstantiateObjects
  1528.           Set doc = source.document
  1529.           Dim url As String
  1530.           url = doc.url(0)
  1531.           
  1532.           If GetcurrentLocation = "3" Then
  1533.                source.close
  1534.                w.urlopen(url)
  1535.           End If
  1536.      End If
  1537. End Sub
  1538. '++LotusScript Development Environment:2:2:Terminate:1:10
  1539. Sub Terminate
  1540.      
  1541.      
  1542.      
  1543.      
  1544. End Sub
  1545. '++LotusScript Development Environment:2:2:Queryopen:1:12
  1546. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1547.      
  1548. End Sub
  1549.                                                                                                                                                                                         
  1550. Title:
  1551. Title
  1552. Title
  1553. You must enter a subject for your document.
  1554. Title
  1555.                         
  1556. URL:        
  1557. Stub/Status:
  1558. HTTPStatus
  1559. Type:        
  1560. Host:        
  1561.             File Name:    
  1562.     0S0E
  1563. FileName
  1564. SaveOptions
  1565. Subject
  1566. Subject
  1567.     1S2S3S
  1568. Subject
  1569. Title
  1570. Subject
  1571.                                                                                                                                                                                         
  1572.     0S0E
  1573.     0S0E
  1574.     0S0E
  1575. '++LotusScript Development Environment:2:5:(Options):0:66
  1576. '++LotusScript Development Environment:2:5:(Forward):0:1
  1577. Declare Sub Click(Source As Button)
  1578. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1579. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1580. Private Sub BindEvents(Byval Objectname_ As String)
  1581.      Static Source As BUTTON
  1582.      Set Source = Bind(Objectname_)
  1583.      On Event Click From Source Call Click
  1584. End Sub
  1585. '++LotusScript Development Environment:2:2:Click:1:12
  1586. Sub Click(Source As Button)
  1587.      
  1588.      If (doc Is Nothing) Then InstantiateFormObjects
  1589.      OpenHomeURL
  1590. End Sub
  1591. Reload(
  1592.     0S0E
  1593. '++LotusScript Development Environment:2:5:(Options):0:66
  1594. '++LotusScript Development Environment:2:5:(Forward):0:1
  1595. Declare Sub Click(Source As Button)
  1596. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1597. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1598. Private Sub BindEvents(Byval Objectname_ As String)
  1599.      Static Source As BUTTON
  1600.      Set Source = Bind(Objectname_)
  1601.      On Event Click From Source Call Click
  1602. End Sub
  1603. '++LotusScript Development Environment:2:2:Click:1:12
  1604. Sub Click(Source As Button)
  1605.      
  1606.      If (doc Is Nothing) Then InstantiateFormObjects
  1607.      OpenSearchSite doc
  1608. End Sub
  1609. ForwardK
  1610. ForwardK'++LotusScript Development Environment:2:5:(Options):0:66
  1611. '++LotusScript Development Environment:2:5:(Forward):0:1
  1612. Declare Sub Click(Source As Button)
  1613. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1614. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1615. Private Sub BindEvents(Byval Objectname_ As String)
  1616.      Static Source As BUTTON
  1617.      Set Source = Bind(Objectname_)
  1618.      On Event Click From Source Call Click
  1619. End Sub
  1620. '++LotusScript Development Environment:2:2:Click:1:12
  1621. Sub Click(Source As Button)
  1622.      InstantiateFormObjects
  1623.      Call NotesForwardNote(doc)
  1624. End Sub
  1625. Print... 
  1626.     0S0E
  1627. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  1628. '++LotusScript Development Environment:2:5:(Forward):0:1
  1629. Declare Sub Click(Source As Button)
  1630. Declare Function GetInternetProfile As NotesDocument
  1631. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1632. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1633. Private Sub BindEvents(Byval Objectname_ As String)
  1634.      Static Source As BUTTON
  1635.      Set Source = Bind(Objectname_)
  1636.      On Event Click From Source Call Click
  1637. End Sub
  1638. '++LotusScript Development Environment:2:2:Click:1:12
  1639. Sub Click(Source As Button)
  1640.      If (doc Is Nothing) Then InstantiateFormObjects
  1641.      If doc.hasitem("URL") Then
  1642.           If (docProfile Is Nothing) Then
  1643.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  1644.                Exit Sub 
  1645.           End If
  1646.           doc.tmpWebServer  = docProfile.WebServer
  1647.           doc.tmpWebDb = docProfile.WebDatabase
  1648.       'first, display a prompt to get user input
  1649.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  1650.                doc.Save True, True
  1651.           'determine which action we need to take
  1652.                Select Case doc.SharedOptions(0)
  1653.        '   Case "1" : 'user wants to forward this as a bookmark
  1654.                'CreateNotesLink doc               
  1655.                Case "2" : 'user wants to copy this to the shared web database
  1656.                     CopyDocumentToSharedDatabase doc, doc.url(0)               
  1657.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  1658.                     CreateRatingDocument doc, doc.url(0), doc.title(0)
  1659.                End Select
  1660.           'remove any remaining fields that don't need to be carried around
  1661.                doc.removeItem "ForwardTo"
  1662.                doc.RemoveItem "SharedOptions" 
  1663.                doc.removeItem "ForwardTo"
  1664.                doc.RemoveItem "SharedOptions" 
  1665.                doc.RemoveItem "Rating"
  1666.                doc.removeItem "Content"
  1667.                doc.removeItem "Comments"
  1668.                doc.RemoveItem "tmpWebServer"
  1669.                doc.RemoveItem "tmpWebDb"
  1670.                doc.Save True,True          
  1671.           End If
  1672.      Else
  1673.           Msgbox "This document does not contain a URL."
  1674.      End If
  1675. End Sub
  1676. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  1677. Function GetInternetProfile As NotesDocument
  1678.      'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  1679.      Set view = db.getView("(Internet Profile)")
  1680.      Set GetInternetProfile = view.GetFirstDocument
  1681. End Function
  1682. Internet Profiles
  1683. Internet Options
  1684. webserver
  1685.     12S13S
  1686. Categori_zeK
  1687. _Edit Document
  1688. Send Docu_ment
  1689. _Remove from Folder...
  1690. Open History FolderK
  1691. Import Microsoft Favorites...
  1692. '++LotusScript Development Environment:2:5:(Options):0:66
  1693. '++LotusScript Development Environment:2:5:(Forward):0:1
  1694. Declare Sub Click(Source As Button)
  1695. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1696. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1697. Private Sub BindEvents(Byval Objectname_ As String)
  1698.      Static Source As BUTTON
  1699.      Set Source = Bind(Objectname_)
  1700.      On Event Click From Source Call Click
  1701. End Sub
  1702. '++LotusScript Development Environment:2:2:Click:1:12
  1703. Sub Click(Source As Button)
  1704.      ImportFavorites
  1705. End Sub
  1706. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  1707. '++LotusScript Development Environment:2:5:(Forward):0:1
  1708. Declare Sub Click(Source As Button)
  1709. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1710. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1711. Private Sub BindEvents(Byval Objectname_ As String)
  1712.      Static Source As BUTTON
  1713.      Set Source = Bind(Objectname_)
  1714.      On Event Click From Source Call Click
  1715. End Sub
  1716. '++LotusScript Development Environment:2:2:Click:1:12
  1717. Sub Click(Source As Button)
  1718.      ImportBookmarks
  1719. End Sub
  1720. Add Bookmark...K 
  1721.     0S0E
  1722. O=Lotus Notes
  1723. O=Lotus Notes
  1724. PURSAFO
  1725. |.:#U
  1726. O=Lotus Notes
  1727. CN=Lotus Notes Template Development/O=Lotus Notes
  1728. PURSAFO
  1729. Fde!f^^
  1730. Counter
  1731. $Hotspot0_O
  1732. Created
  1733. Expiration
  1734. Privacy_flags
  1735. Original_Date
  1736. Last_Modified
  1737. $SCRIPTOBJ_21
  1738. $SCRIPTOBJ_20
  1739. $TITLE
  1740. $INFO
  1741. $WINDOWTITLE
  1742. $Script
  1743. $$Script_O
  1744. $$ScriptName
  1745. $$FormScript
  1746. $$$FormScript_O
  1747. $BODY
  1748. $ACTIONS
  1749. $SCRIPTOBJ_3
  1750. $SCRIPTOBJ_5
  1751. $SCRIPTOBJ_7
  1752. $SCRIPTOBJ_9
  1753. $SCRIPTOBJ_16
  1754. $SCRIPTOBJ_17
  1755. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  1756. '++LotusScript Development Environment:2:5:(Forward):0:1
  1757. Declare Sub Click(Source As Button)
  1758. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1759. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1760. Private Sub BindEvents(Byval Objectname_ As String)
  1761.      Static Source As BUTTON
  1762.      Set Source = Bind(Objectname_)
  1763.      On Event Click From Source Call Click
  1764. End Sub
  1765. '++LotusScript Development Environment:2:2:Click:1:12
  1766. Sub Click(Source As Button)
  1767.      Browse
  1768.      
  1769. End Sub
  1770. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  1771. '++LotusScript Development Environment:2:5:(Forward):0:1
  1772. Declare Sub Click(Source As Button)
  1773. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1774. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1775. Private Sub BindEvents(Byval Objectname_ As String)
  1776.      Static Source As BUTTON
  1777.      Set Source = Bind(Objectname_)
  1778.      On Event Click From Source Call Click
  1779. End Sub
  1780. '++LotusScript Development Environment:2:2:Click:1:12
  1781. Sub Click(Source As Button)
  1782.      ViewDelete     
  1783.      
  1784. End Sub
  1785. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  1786. '++LotusScript Development Environment:2:5:(Forward):0:1
  1787. Declare Sub Click(Source As Button)
  1788. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1789. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1790. Private Sub BindEvents(Byval Objectname_ As String)
  1791.      Static Source As BUTTON
  1792.      Set Source = Bind(Objectname_)
  1793.      On Event Click From Source Call Click
  1794. End Sub
  1795. '++LotusScript Development Environment:2:2:Click:1:12
  1796. Sub Click(Source As Button)
  1797.      PrintWebDocument
  1798.      
  1799. End Sub
  1800. _SearchK'++LotusScript Development Environment:2:5:(Options):0:66
  1801. '++LotusScript Development Environment:2:5:(Forward):0:1
  1802. Declare Sub Click(Source As Button)
  1803. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1804. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1805. Private Sub BindEvents(Byval Objectname_ As String)
  1806.      Static Source As BUTTON
  1807.      Set Source = Bind(Objectname_)
  1808.      On Event Click From Source Call Click
  1809. End Sub
  1810. '++LotusScript Development Environment:2:2:Click:1:12
  1811. Sub Click(Source As Button)
  1812.      
  1813.      Dim docLocal As NotesDocument
  1814.      Dim docCollection As NotesDocumentCollection     
  1815.      Set docCollection = db.UnprocessedDocuments
  1816.      If (docCollection.Count = 0) Then
  1817.           Msgbox "You must select a document.",16,"Error"
  1818.           Exit Sub
  1819.      End If
  1820.      Set docLocal = docCollection.GetFirstDocument
  1821.      OpenSearchSite docLocal
  1822. End Sub
  1823. $IndexY
  1824.     0S0E
  1825. _Forward
  1826. Sh_are...
  1827. '++LotusScript Development Environment:2:5:(Options):0:66
  1828. '++LotusScript Development Environment:2:5:(Forward):0:1
  1829. Declare Sub Click(Source As Button)
  1830. Declare Function GetInternetProfile
  1831. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1832. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1833. Private Sub BindEvents(Byval Objectname_ As String)
  1834.      Static Source As BUTTON
  1835.      Set Source = Bind(Objectname_)
  1836.      On Event Click From Source Call Click
  1837. End Sub
  1838. '++LotusScript Development Environment:2:2:Click:1:12
  1839. Sub Click(Source As Button)
  1840.      
  1841.      Dim docLocal As NotesDocument
  1842.      Dim webdoc As notesdocument
  1843.      Dim docCollection As NotesDocumentCollection     
  1844.      Set docCollection = db.UnprocessedDocuments
  1845.      If (docCollection.Count = 0) Then
  1846.           Msgbox "You must select a document.",16,"Error"
  1847.           Exit Sub
  1848.      End If
  1849.      Set docLocal = docCollection.GetFirstDocument
  1850.      If docLocal.hasitem("URL") Then
  1851.           docLocal.tmpWebServer  = docProfile.WebServer
  1852.           docLocal.tmpWebDb = docProfile.WebDatabase
  1853.           docLocal.Save True, True
  1854.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  1855.                docLocal.Save True, True
  1856.                Select Case docLocal.SharedOptions(0)
  1857.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  1858.                Case "2" : 'user wants to copy this to the shared web database
  1859.                     If docLocal.Form(0) = "WebBrowserForm" Then
  1860.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  1861.                     Else
  1862.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  1863.                     End If
  1864.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  1865.                     If docLocal.Form(0) = "WebBrowserForm" Then
  1866.                          CreateRatingDocument docLocal, browserobject.locationurl,browserobject.locationname
  1867.                     Else
  1868.                          CreateRatingDocument docLocal,docLocal.url(0),docLocal.title(0)
  1869.                     End If
  1870.                End Select
  1871.           'remove any remaining fields that don't need to be carried around
  1872.                docLocal.removeItem "ForwardTo"
  1873.                docLocal.RemoveItem "SharedOptions" 
  1874.                docLocal.RemoveItem "Rating"
  1875.                docLocal.removeItem "Content"
  1876.                docLocal.removeItem "Comments"
  1877.           End If     
  1878.           docLocal.RemoveItem "tmpWebServer"
  1879.           docLocal.RemoveItem "tmpWebDb"
  1880.           docLocal.Save True, True
  1881.      Else
  1882.           Msgbox "This document does not contain a URL."
  1883.      End If
  1884. End Sub
  1885. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  1886. Function GetInternetProfile
  1887.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  1888.      Set view = db.getView("(Internet Profile)")
  1889.      Set GetInternetProfile = view.GetFirstDocument
  1890. End Function
  1891. Internet Profiles
  1892. Internet Options
  1893. WebServer
  1894.     0S0E
  1895. Categori_zeK
  1896. _Edit Document    
  1897. Send Docu_ment
  1898. _Move to Folder...
  1899. Move Page to Folder... 
  1900.     0S0E
  1901. _Remove from Folder...
  1902. _Reduce to BookmarkK'++LotusScript Development Environment:2:5:(Options):0:66
  1903. '++LotusScript Development Environment:2:5:(Forward):0:1
  1904. Declare Sub Click(Source As Button)
  1905. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1906. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1907. Private Sub BindEvents(Byval Objectname_ As String)
  1908.      Static Source As BUTTON
  1909.      Set Source = Bind(Objectname_)
  1910.      On Event Click From Source Call Click
  1911. End Sub
  1912. '++LotusScript Development Environment:2:2:Click:1:12
  1913. Sub Click(Source As Button)
  1914.      
  1915.      Dim docCollection As NotesDocumentCollection
  1916.      Dim docLocal As NotesDocument
  1917.      
  1918.      Set docCollection = db.UnprocessedDocuments
  1919.      If (docCollection.Count = 0) Then
  1920.           Msgbox "You must select a document.",16,"Error"
  1921.           Exit Sub
  1922.      End If
  1923.      Set docLocal = docCollection.GetFirstDocument
  1924.      While Not (docLocal Is Nothing)
  1925.           RemoveObjects docLocal
  1926.           ReduceToLink docLocal
  1927.           Set docLocal = docCollection.GetNextDocument(docLocal)
  1928.      Wend
  1929. End Sub
  1930. Import Microsoft Favorites...
  1931. '++LotusScript Development Environment:2:5:(Options):0:66
  1932. '++LotusScript Development Environment:2:5:(Forward):0:1
  1933. Declare Sub Click(Source As Button)
  1934. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1935. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1936. Private Sub BindEvents(Byval Objectname_ As String)
  1937.      Static Source As BUTTON
  1938.      Set Source = Bind(Objectname_)
  1939.      On Event Click From Source Call Click
  1940. End Sub
  1941. '++LotusScript Development Environment:2:2:Click:1:12
  1942. Sub Click(Source As Button)
  1943.      
  1944.      ImportFavorites
  1945. End Sub
  1946. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  1947. '++LotusScript Development Environment:2:5:(Forward):0:1
  1948. Declare Sub Click(Source As Button)
  1949. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1950. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1951. Private Sub BindEvents(Byval Objectname_ As String)
  1952.      Static Source As BUTTON
  1953.      Set Source = Bind(Objectname_)
  1954.      On Event Click From Source Call Click
  1955. End Sub
  1956. '++LotusScript Development Environment:2:2:Click:1:12
  1957. Sub Click(Source As Button)
  1958.      
  1959.      ImportBookmarks
  1960. End Sub
  1961. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  1962. '++LotusScript Development Environment:2:5:(Forward):0:1
  1963. Declare Sub Click(Source As Button)
  1964. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1965. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1966. Private Sub BindEvents(Byval Objectname_ As String)
  1967.      Static Source As BUTTON
  1968.      Set Source = Bind(Objectname_)
  1969.      On Event Click From Source Call Click
  1970. End Sub
  1971. '++LotusScript Development Environment:2:2:Click:1:12
  1972. Sub Click(Source As Button)
  1973.      
  1974.      Dim docLocal As NotesDocument
  1975.      Dim docCollection As NotesDocumentCollection     
  1976.      Set docCollection = db.UnprocessedDocuments
  1977.      If (docCollection.Count = 0) Then
  1978.           Msgbox "You must select a document.",16,"Error"
  1979.           Exit Sub
  1980.      Else
  1981.           For j = 1 To docCollection.Count
  1982.                Set docLocal = docCollection.getnthdocument(j)               
  1983.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  1984.                     Select Case docLocal.ForwardOptions(0)
  1985.                     Case "1" : 'user wants to forward the URL only
  1986.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  1987.                     Case "2" : 'user wants to send entire page
  1988.                          Call  ViewForward(docLocal)
  1989.                     End Select
  1990.           'remove any remaining fields that don't need to be carried around
  1991.                     docLocal.RemoveItem "ForwardOptions" 
  1992.                     docLocal.save True, False
  1993.                     
  1994.                End If
  1995.                Exit Sub
  1996.           Next
  1997.      End If
  1998.      Exit Sub
  1999. End Sub
  2000. '++LotusScript Development Environment:2:5:(Options):0:74
  2001. Option Public
  2002. Use "InternetFunctions"
  2003. '++LotusScript Development Environment:2:5:(Forward):0:1
  2004. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2005. '++LotusScript Development Environment:2:5:(Options):0:66
  2006. '++LotusScript Development Environment:2:5:(Forward):0:1
  2007. Declare Sub Postopen(Source As Notesuiview)
  2008. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  2009. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2010. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2011. Private Sub BindEvents(Byval Objectname_ As String)
  2012.      Static Source As NOTESUIVIEW
  2013.      Set Source = Bind(Objectname_)
  2014.      On Event Postopen From Source Call Postopen
  2015.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  2016. End Sub
  2017. '++LotusScript Development Environment:2:2:Postopen:1:12
  2018. Sub Postopen(Source As Notesuiview)
  2019.      InstantiateObjects
  2020. End Sub
  2021. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  2022. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  2023.      Call MoveToFolder(source,target,continue)
  2024. End Sub
  2025. O=Lotus Notes
  2026. O=Lotus Notes
  2027. PURSAFO
  2028. |.:#U
  2029. O=Lotus Notes
  2030. CN=Lotus Notes Template Development/O=Lotus Notes
  2031. PURSAFO
  2032. Fde!f^^
  2033. ":MtY^Y
  2034. #lW?$
  2035. $SCRIPTOBJ_20
  2036. $SCRIPTOBJ_19
  2037. $SCRIPTOBJ_17
  2038. $SCRIPTOBJ_18
  2039. $SCRIPTOBJ_16
  2040. $TITLE
  2041. $Name
  2042. $Index
  2043. $Formula
  2044. $FormulaClass
  2045. $VIEWFORMAT
  2046. $FormFormula
  2047. $Comment
  2048. $ACTIONS
  2049. $SCRIPTOBJ_0
  2050. $SCRIPTOBJ_1
  2051. $SCRIPTOBJ_2
  2052. $SCRIPTOBJ_3
  2053. $SCRIPTOBJ_5
  2054. $SCRIPTOBJ_12
  2055. $SCRIPTOBJ_13
  2056. $SCRIPTOBJ_14
  2057. $SCRIPTOBJ_15
  2058. $ViewGlobalScript
  2059. $ViewGlobalScript_O
  2060. $ViewScript
  2061. $ViewScript_O
  2062.  Forward
  2063. ForwardOptions
  2064. Forward bookmark to page|1Forward copy of page|2
  2065. ForwardOptions
  2066.     0S0E
  2067.     0S0E
  2068. ?_?__
  2069. `!b`1
  2070. 7`^///?
  2071. ?b___
  2072. `bOOO
  2073. `<b!R
  2074.                                 
  2075.     0S0E
  2076.     0S0E
  2077. ForwardOptions
  2078.     0S0E
  2079.     0S0E
  2080. ;&565'
  2081. 5&E5E5
  2082. &64&6&646'
  2083. ?_?__
  2084. `!b`1
  2085. 7`^///?
  2086. ?b___
  2087. `bOOO
  2088. `<b!R
  2089.                                 4
  2090. tFlags$UpdatedBy
  2091. Create Authorize--------apikoff/O=Iris$$;;;;;;;;WR1
  2092. off/O=Iris$$
  2093. O=Lotus Notes
  2094. O=Lotus Notes
  2095. PURSAFO
  2096. |.:#U
  2097. O=Lotus Notes
  2098. CN=Lotus Notes Template Development/O=Lotus Notes
  2099. PURSAFO
  2100. Fde!f^^
  2101. $TITLE
  2102. $INFO
  2103. $$ScriptName
  2104. $BODY
  2105. '++LotusScript Development Environment:2:5:(Options):0:66
  2106. '++LotusScript Development Environment:2:5:(Forward):0:1
  2107. Declare Sub Beforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2108. Declare Sub Navigatecomplete(Source As Webbrowser, Url As String)
  2109. Declare Sub Framebeforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2110. Declare Sub Framenavigatecomplete(Source As Webbrowser, Url As String)
  2111. Declare Sub Framenewwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2112. Declare Sub Downloadbegin(Source As Webbrowser)
  2113. Declare Sub Downloadcomplete(Source As Webbrowser)
  2114. Declare Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  2115. Declare Sub Titlechange(Source As Webbrowser, Text As String)
  2116. Declare Sub Statustextchange(Source As Webbrowser, Text As String)     
  2117. Declare Sub Initialize
  2118. Declare Sub Newwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2119. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2120. Dim WebDatabase As notesdatabase
  2121. Dim datadoc As notesdocument
  2122. Dim Session As notessession
  2123. Dim DocNoteID As notesdocument
  2124. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2125. Private Sub BindEvents(Byval Objectname_ As String)
  2126.      Static Source As WEBBROWSER
  2127.      Set Source = Bind(Objectname_)
  2128.      On Event Beforenavigate From Source Call Beforenavigate
  2129.      On Event Navigatecomplete From Source Call Navigatecomplete
  2130.      On Event Framebeforenavigate From Source Call Framebeforenavigate
  2131.      On Event Framenavigatecomplete From Source Call Framenavigatecomplete
  2132.      On Event Framenewwindow From Source Call Framenewwindow
  2133.      On Event Downloadbegin From Source Call Downloadbegin
  2134.      On Event Downloadcomplete From Source Call Downloadcomplete
  2135.      On Event Progresschange From Source Call Progresschange
  2136.      On Event Titlechange From Source Call Titlechange
  2137.      On Event Statustextchange From Source Call Statustextchange
  2138.      On Event Newwindow From Source Call Newwindow
  2139. End Sub
  2140. '++LotusScript Development Environment:2:2:Beforenavigate:1:12
  2141. Sub Beforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2142.       '    A navigation has requested a new window be opened
  2143.      ' we'll take care of everything and tell the caller we opened a new window
  2144.      ' otherwise the IE application starts up in a new window
  2145.      
  2146.      On Error 213 Resume Next
  2147.      
  2148.      If uidoc.inpreviewpane And firstnavigatedone Then
  2149.           If Instr(parseURL(url), "mailto") =0 Then
  2150.                Dim iedoc As New notesdocument(db)
  2151.                Dim newuidoc As NotesUIDocument
  2152.                Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2153.                Call iedoc.replaceitemvalue("SaveOptions", "1")
  2154.                Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2155.                Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2156.                Call ieDoc.save(True,False)
  2157.                Call w.viewrefresh
  2158.                Call w.editdocument(False, iedoc) 
  2159.                Set newuidoc = w.currentdocument        
  2160.                Set browserobject=newuidoc.GetObject("Browser")
  2161.                browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2162.                Cancel = True
  2163.           Else
  2164.                browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2165.           End If
  2166.      End If       
  2167. End Sub
  2168. '++LotusScript Development Environment:2:2:Navigatecomplete:1:12
  2169. Sub Navigatecomplete(Source As Webbrowser, Url As String)
  2170.      Dim nulldoc As notesdocument
  2171.      'Error 213 is OLEException Error in lserr.lss
  2172.      On Error 213 Goto ErrorRoutine
  2173.      
  2174.      If url <>"" Then
  2175.      ' Set the URL in the Navigation Bar URL field
  2176.           uidoc.NavBarSetText Url
  2177.           If docprofile Is Nothing Then 
  2178.                'This will happen if the user is opening the database for the first time therefore the dbopen script has not been
  2179.                'executed.  Go ahead and retrieve the document because keeppage is on automatically.
  2180.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2181.                Exit Sub
  2182.           End If
  2183.           If docprofile.keeppage(0) = "0" Then
  2184.                 ' Request the URL to be retrieved but don't wait for it to come in
  2185.               ' Print "(DEBUG) - Queue request for: " + url
  2186.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2187.           End If
  2188.           
  2189.      End If
  2190.      
  2191.      Exit Sub
  2192. ErrorRoutine:
  2193.      Print "Error:  Accessing web browser control ErrOLEException("& Err & ")"
  2194.      Resume Next
  2195.      
  2196. End Sub
  2197. '++LotusScript Development Environment:2:2:Framebeforenavigate:1:12
  2198. Sub Framebeforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2199.      
  2200. End Sub
  2201. '++LotusScript Development Environment:2:2:Framenavigatecomplete:1:12
  2202. Sub Framenavigatecomplete(Source As Webbrowser, Url As String)
  2203.      
  2204. End Sub
  2205. '++LotusScript Development Environment:2:2:Framenewwindow:1:12
  2206. Sub Framenewwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2207.      
  2208.  '    A navigation has requested a new window be opened
  2209.      ' we'll take care of everything and tell the caller we opened a new window
  2210.      ' otherwise the IE application starts up in a new window
  2211.      
  2212.      
  2213.      Dim iedoc As New notesdocument(db)
  2214.      Dim newuidoc As NotesUIDocument
  2215.      
  2216.      Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2217.      Call iedoc.replaceitemvalue("SaveOptions", "1")
  2218.      Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2219.      Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2220.      Call ieDoc.save(True,False)
  2221.      Call w.viewrefresh
  2222.      Call w.editdocument(False, iedoc) 
  2223.      Set newuidoc = w.currentdocument
  2224.      
  2225.      Set browserobject=newuidoc.GetObject("Browser")
  2226.      browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2227.      
  2228.      Processed = True
  2229.      
  2230. End Sub
  2231. '++LotusScript Development Environment:2:2:Downloadbegin:1:12
  2232. Sub Downloadbegin(Source As Webbrowser)
  2233.     '   Start Animation...
  2234.      uidoc.Navbarspinnerstart
  2235. End Sub
  2236. '++LotusScript Development Environment:2:2:Downloadcomplete:1:12
  2237. Sub Downloadcomplete(Source As Webbrowser)
  2238.      
  2239.      '   Stop Animation...
  2240.      uidoc.Navbarspinnerstop
  2241.      
  2242. End Sub
  2243. '++LotusScript Development Environment:2:2:Progresschange:1:12
  2244. Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  2245.      Dim percent As Long
  2246.      If progress = -1 Then
  2247.           Print "   Done"
  2248.      Else  
  2249.           If ProgressMax > 0 Then
  2250.                percent = (Progress * 100) / Progressmax
  2251.                If percent > 0 Then
  2252.                     Print "   " & percent & " %  complete"
  2253.                End If
  2254.           Else
  2255.                If progress >0 Then 
  2256.                     Print "   " & progress & " bytes read"
  2257.                End If 
  2258.           End If
  2259.      End If
  2260.      
  2261. End Sub
  2262. '++LotusScript Development Environment:2:2:Titlechange:1:12
  2263. Sub Titlechange(Source As Webbrowser, Text As String)
  2264.      Dim NavBarURL As String
  2265. '    Ask the browser object for the current URL     
  2266.      NavBarURL = browserobject.LocationURL     
  2267. '    Set the Text in the Nav bar and the window title
  2268.      uidoc.NavBarSetText NavBarURL, Text
  2269. End Sub
  2270. '++LotusScript Development Environment:2:2:Statustextchange:1:12
  2271. Sub Statustextchange(Source As Webbrowser, Text As String)     
  2272.      Print "   " & Text 
  2273. End Sub
  2274. '++LotusScript Development Environment:2:2:Initialize:1:10
  2275. Sub Initialize
  2276.      '*
  2277.      '*  Initialize  Variables and declare local variables
  2278.      '*
  2279.      Dim InterNetProfile As Notesdocument
  2280.      Dim ProfileView As notesview
  2281.      Dim URL As Variant
  2282.      
  2283.      Set Session = New NotesSession
  2284.      Set WebDatabase = Session.CurrentDatabase
  2285. End Sub
  2286. '++LotusScript Development Environment:2:2:Newwindow:1:12
  2287. Sub Newwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2288.          '
  2289.  '    A navigation has requested a new window be opened
  2290.      ' we'll take care of everything and tell the caller we opened a new window
  2291.      ' otherwise the IE application starts up in a new window
  2292.      
  2293.   '   InstantiateWebBrowserFormObjects
  2294.      
  2295.      Dim iedoc As New notesdocument(db)
  2296.      Dim newuidoc As NotesUIDocument
  2297.     'Print "Got New Window request..."
  2298.      
  2299.      Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2300.      Call iedoc.replaceitemvalue("SaveOptions", "1")
  2301.      Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2302.      Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2303.      Call ieDoc.save(True,False)
  2304.      Call w.viewrefresh
  2305.      Call w.editdocument(False, iedoc) 
  2306.      Set newuidoc = w.currentdocument
  2307.      
  2308.      Set browserobject=newuidoc.GetObject("Browser")
  2309.      browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2310.      
  2311.      Processed=True
  2312. End Sub
  2313. \    \    4
  2314. Notes Web Browsing
  2315.     0S0E
  2316. &Arial
  2317. '++LotusScript Development Environment:2:5:(Options):0:74
  2318. Option Public
  2319. Use "InternetFunctions"
  2320. '++LotusScript Development Environment:2:5:(Forward):0:1
  2321. Declare Sub InstantiateWebBrowserFormObjects
  2322. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2323. 'Global Form Variables
  2324. Dim uidoc As notesuidocument
  2325. Dim doc As notesdocument
  2326. Dim browserobject As Variant
  2327. '++LotusScript Development Environment:2:2:InstantiateWebBrowserFormObjects:1:8
  2328. Sub InstantiateWebBrowserFormObjects
  2329.      InstantiateObjects
  2330.      
  2331.      Set uidoc = w.CurrentDocument    
  2332.      Set doc = uidoc.Document     
  2333.      Set browserobject=uidoc.GetObject("Browser")
  2334.      
  2335. End Sub
  2336. WebBrowserForm'++LotusScript Development Environment:2:5:(Options):0:66
  2337. '++LotusScript Development Environment:2:5:(Forward):0:1
  2338. Declare Sub Postopen(Source As Notesuidocument)
  2339. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2340. Declare Sub Initialize
  2341. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  2342. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2343. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2344. Private Sub BindEvents(Byval Objectname_ As String)
  2345.      Static Source As NOTESUIDOCUMENT
  2346.      Set Source = Bind(Objectname_)
  2347.      On Event Postopen From Source Call Postopen
  2348.      On Event Queryclose From Source Call Queryclose
  2349.      On Event Queryopen From Source Call Queryopen
  2350. End Sub
  2351. '++LotusScript Development Environment:2:2:Postopen:1:12
  2352. Sub Postopen(Source As Notesuidocument)
  2353.      
  2354.      InstantiateWebBrowserFormObjects
  2355.      If docprofile Is Nothing Then
  2356.           Set docprofile = New NotesDocument(db)
  2357.           docprofile.Form = "Admin"
  2358.           docprofile.StartUpOptions = "1"
  2359.           docprofile.OpenURL = "http://notes.net/welcome.nsf"
  2360.           docprofile.PreferredSearchEngine = "4"
  2361.           docprofile.SearchURL="http://www.search.com/"
  2362.           docprofile.ScanAhead = "1"
  2363.           docprofile.SearchFrequency = "2"
  2364.           docprofile.UpdatesFoundOptions = "1"
  2365.           docprofile.SendMailTo = session.UserName
  2366.           docprofile.ReduceDays = "2"
  2367.           docprofile.KeepPage = "0"
  2368.           docprofile.Save True, True
  2369.      End If
  2370.      uidoc.refreshhideformulas
  2371.            ' Make sure there is a URL field and it's not empty before we try to
  2372.           ' navigate there
  2373.      If doc.hasitem("URL")   And doc.URL(0) <> "" Then
  2374.               ' Print "Postopen Navigating to " + doc.URL(0)
  2375.           browserobject.navigate doc.url(0)
  2376.           If source.inpreviewpane Then
  2377.                firstnavigatedone = True
  2378.           End If
  2379.      End If    
  2380. End Sub
  2381. '++LotusScript Development Environment:2:2:Queryclose:1:12
  2382. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2383.      
  2384.     ' If source.document.hasitem("firstnavigatedone") Then          
  2385.      FirstNavigateDone = False
  2386.      '     source.document.removeitem("firstnavigatedone")
  2387.       '    source.document.removeitem("$FILE")
  2388.        '   source.document.removeitem("$OLEOBJINFO")
  2389.         '  source.document.save True, False
  2390.    '  Print "reset flag field"
  2391.    ' Print firstnavigatedone
  2392.      'End If
  2393. End Sub
  2394. '++LotusScript Development Environment:2:2:Initialize:1:10
  2395. Sub Initialize
  2396. End Sub
  2397. '++LotusScript Development Environment:2:2:Queryopen:1:12
  2398. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  2399.      
  2400. End Sub
  2401. SaveOptions
  2402. EXT34422Shell.Explorer.1
  2403. $OLEPreviewActivate
  2404. '++LotusScript Development Environment:2:5:(Options):0:66
  2405. '++LotusScript Development Environment:2:5:(Forward):0:1
  2406. Declare Sub Click(Source As Button)
  2407. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2408. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2409. Private Sub BindEvents(Byval Objectname_ As String)
  2410.      Static Source As BUTTON
  2411.      Set Source = Bind(Objectname_)
  2412.      On Event Click From Source Call Click
  2413. End Sub
  2414. '++LotusScript Development Environment:2:2:Click:1:12
  2415. Sub Click(Source As Button)
  2416.      On Error Goto OLEError
  2417.      InstantiateWebBrowserFormObjects
  2418.      IEPreviousDoc( browserobject)
  2419.      Exit Sub
  2420.      
  2421. OLEError:
  2422.      Messagebox Error & "(PreviousDoc)"
  2423.      Exit Sub
  2424. End Sub
  2425. '++LotusScript Development Environment:2:5:(Options):0:66
  2426. '++LotusScript Development Environment:2:5:(Forward):0:1
  2427. Declare Sub Click(Source As Button)
  2428. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2429. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2430. Private Sub BindEvents(Byval Objectname_ As String)
  2431.      Static Source As BUTTON
  2432.      Set Source = Bind(Objectname_)
  2433.      On Event Click From Source Call Click
  2434. End Sub
  2435. '++LotusScript Development Environment:2:2:Click:1:12
  2436. Sub Click(Source As Button)
  2437.      On Error Goto OLEError 
  2438.      InstantiateWebBrowserFormObjects
  2439.      IENextDoc( browserobject)
  2440.      Exit Sub
  2441. OLEError:
  2442.      Msgbox Error & "(NextDocument)"
  2443.      Exit Sub
  2444. End Sub
  2445. '++LotusScript Development Environment:2:5:(Options):0:66
  2446. '++LotusScript Development Environment:2:5:(Forward):0:1
  2447. Declare Sub Click(Source As Button)
  2448. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2449. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2450. Private Sub BindEvents(Byval Objectname_ As String)
  2451.      Static Source As BUTTON
  2452.      Set Source = Bind(Objectname_)
  2453.      On Event Click From Source Call Click
  2454. End Sub
  2455. '++LotusScript Development Environment:2:2:Click:1:12
  2456. Sub Click(Source As Button)
  2457.      InstantiateWebBrowserFormObjects
  2458.      IEStop (browserobject)
  2459.      
  2460. End Sub
  2461. '++LotusScript Development Environment:2:5:(Options):0:66
  2462. '++LotusScript Development Environment:2:5:(Forward):0:1
  2463. Declare Sub Click(Source As Button)
  2464. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2465. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2466. Private Sub BindEvents(Byval Objectname_ As String)
  2467.      Static Source As BUTTON
  2468.      Set Source = Bind(Objectname_)
  2469.      On Event Click From Source Call Click
  2470. End Sub
  2471. '++LotusScript Development Environment:2:2:Click:1:12
  2472. Sub Click(Source As Button)
  2473.      InstantiateWebBrowserFormObjects
  2474.      browserobject.Refresh
  2475. End Sub
  2476. '++LotusScript Development Environment:2:5:(Options):0:66
  2477. '++LotusScript Development Environment:2:5:(Forward):0:1
  2478. Declare Sub Click(Source As Button)
  2479. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2480. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2481. Private Sub BindEvents(Byval Objectname_ As String)
  2482.      Static Source As BUTTON
  2483.      Set Source = Bind(Objectname_)
  2484.      On Event Click From Source Call Click
  2485. End Sub
  2486. '++LotusScript Development Environment:2:2:Click:1:12
  2487. Sub Click(Source As Button)
  2488.      
  2489.      InstantiateWebBrowserFormObjects
  2490.      If docprofile.OpenURL(0) <> "" Then
  2491.           browserobject.GoHome
  2492.      Else
  2493.           Msgbox "Home page is not specified in your Internet Options.  "  _
  2494.           + "Please select Actions - Internet Options to specify a home page. " , 16,"Open Home Page"    
  2495.      End If
  2496. End Sub
  2497. _ReloadK'++LotusScript Development Environment:2:5:(Options):0:66
  2498. '++LotusScript Development Environment:2:5:(Forward):0:1
  2499. Declare Sub Click(Source As Button)
  2500. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2501. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2502. Private Sub BindEvents(Byval Objectname_ As String)
  2503.      Static Source As BUTTON
  2504.      Set Source = Bind(Objectname_)
  2505.      On Event Click From Source Call Click
  2506. End Sub
  2507. '++LotusScript Development Environment:2:2:Click:1:12
  2508. Sub Click(Source As Button)
  2509.      
  2510.      InstantiateWebBrowserFormObjects
  2511.      browserobject.Refresh
  2512. End Sub
  2513. '++LotusScript Development Environment:2:5:(Options):0:66
  2514. '++LotusScript Development Environment:2:5:(Forward):0:1
  2515. Declare Sub Click(Source As Button)
  2516. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2517. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2518. Private Sub BindEvents(Byval Objectname_ As String)
  2519.      Static Source As BUTTON
  2520.      Set Source = Bind(Objectname_)
  2521.      On Event Click From Source Call Click
  2522. End Sub
  2523. '++LotusScript Development Environment:2:2:Click:1:12
  2524. Sub Click(Source As Button)
  2525.      
  2526.      InstantiateWebBrowserFormObjects
  2527.      browserobject.GoSearch
  2528. End Sub
  2529. Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  2530. '++LotusScript Development Environment:2:5:(Forward):0:1
  2531. Declare Sub Click(Source As Button)
  2532. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2533. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2534. Private Sub BindEvents(Byval Objectname_ As String)
  2535.      Static Source As BUTTON
  2536.      Set Source = Bind(Objectname_)
  2537.      On Event Click From Source Call Click
  2538. End Sub
  2539. '++LotusScript Development Environment:2:2:Click:1:12
  2540. Sub Click(Source As Button)
  2541.      
  2542.      If w.dialogbox("BookmarkSelect", True, True, False, False, False, False, "Select a Folder") Then
  2543.           InstantiateWebBrowserFormObjects
  2544.           Dim bookmark As New notesdocument(db)
  2545.           Dim folder As String
  2546.           Dim webdoc As notesdocument
  2547.           Set webdoc = db.getdocumentbyurl(browserobject.locationurl)
  2548.           If doc.hasitem("Folders") And doc.hasitem("NewFolderName") Then
  2549.                If doc.newfoldername(0) <>"" Then
  2550.                     bookmark.bookmark = "1"
  2551.                     bookmark.title = webdoc.title(0)
  2552.                     bookmark.url = webdoc.url(0)
  2553.                     bookmark.save True, False
  2554.                     bookmark.putinfolder(doc.folders(0)&"\"&doc.newfoldername(0))
  2555.                Else
  2556.                     bookmark.bookmark = "1"
  2557.                     bookmark.title = webdoc.title(0)
  2558.                     bookmark.url = webdoc.url(0)
  2559.                     bookmark.save True, False
  2560.                     bookmark.putinfolder(doc.folders(0))
  2561.                End If
  2562.           End If          
  2563.           'Cleanup the fields put on by dialogbox
  2564.           doc.removeitem("folders")
  2565.           doc.removeitem("newfoldername")
  2566.           doc.save True, False
  2567.      End If
  2568. End Sub
  2569. Keep Page
  2570. '++LotusScript Development Environment:2:5:(Options):0:66
  2571. '++LotusScript Development Environment:2:5:(Forward):0:1
  2572. Declare Sub Click(Source As Button)
  2573. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2574. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2575. Private Sub BindEvents(Byval Objectname_ As String)
  2576.      Static Source As BUTTON
  2577.      Set Source = Bind(Objectname_)
  2578.      On Event Click From Source Call Click
  2579. End Sub
  2580. '++LotusScript Development Environment:2:2:Click:1:12
  2581. Sub Click(Source As Button)
  2582.      
  2583.      On Error Resume Next
  2584.      InstantiateWebBrowserFormObjects
  2585.      Dim nulldoc As notesdocument
  2586.      Dim url As String
  2587.      url = browserobject.locationURL
  2588.      If  url <>"" Then
  2589.           ' Request the URL to be retrieved but don't wait for it to come in
  2590.           Print "(DEBUG) - Queue request for: " + url
  2591.           Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2592.      End If
  2593.      uidoc.refreshhideformulas
  2594. End Sub
  2595. (Internet Profile)
  2596. Internet Options
  2597. keeppage
  2598.     0S0E
  2599. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  2600. '++LotusScript Development Environment:2:5:(Forward):0:1
  2601. Declare Sub Click(Source As Button)
  2602. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2603. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2604. Private Sub BindEvents(Byval Objectname_ As String)
  2605.      Static Source As BUTTON
  2606.      Set Source = Bind(Objectname_)
  2607.      On Event Click From Source Call Click
  2608. End Sub
  2609. '++LotusScript Development Environment:2:2:Click:1:12
  2610. Sub Click(Source As Button)
  2611.      
  2612.      InstantiateWebBrowserFormObjects
  2613.      Call IEForwardNote(doc,Browserobject)
  2614. End Sub
  2615. Print... 
  2616.     0S0E
  2617. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  2618. '++LotusScript Development Environment:2:5:(Forward):0:1
  2619. Declare Sub Click(Source As Button)
  2620. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2621. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2622. Private Sub BindEvents(Byval Objectname_ As String)
  2623.      Static Source As BUTTON
  2624.      Set Source = Bind(Objectname_)
  2625.      On Event Click From Source Call Click
  2626. End Sub
  2627. '++LotusScript Development Environment:2:2:Click:1:12
  2628. Sub Click(Source As Button)
  2629.      
  2630.      InstantiateWebBrowserFormObjects
  2631.      If doc.form(0) <> "HelpForm" Then
  2632.           
  2633.           doc.url=browserobject.locationurl
  2634.           doc.title=browserobject.locationname
  2635.           
  2636.           If (docProfile Is Nothing) Then
  2637.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  2638.                Exit Sub 
  2639.           End If
  2640.           doc.tmpWebServer  = docProfile.WebServer
  2641.           doc.tmpWebDb = docProfile.WebDatabase
  2642.       'first, display a prompt to get user input
  2643.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  2644.               'determine which action we need to take
  2645.                Select Case doc.SharedOptions(0)
  2646.                     
  2647.                Case "2" : 'user wants to copy this to the shared web database
  2648.                     If getcurrentlocation="3" Then
  2649.                          CopyDocumentToSharedDatabase doc, browserobject.locationurl
  2650.                     Else
  2651.                          CopyDocumentToSharedDatabase doc, doc.url(0)
  2652.                     End If
  2653.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  2654.                     If getcurrentlocation="3" Then
  2655.                          CreateRatingDocument doc, browserobject.locationurl, browserobject.Locationname
  2656.                     Else
  2657.                          CreateRatingDocument doc,doc.url(0), doc.title(0)
  2658.                     End If
  2659.                End Select
  2660.           'remove any remaining fields that don't need to be carried around
  2661.                doc.removeItem "ForwardTo"
  2662.                doc.RemoveItem "SharedOptions" 
  2663.                doc.removeItem "ForwardTo"
  2664.                doc.RemoveItem "SharedOptions" 
  2665.                doc.RemoveItem "Rating"
  2666.                doc.removeItem "Content"
  2667.                doc.removeItem "Comments"
  2668.                doc.RemoveItem "tmpWebServer"
  2669.                doc.RemoveItem "tmpWebDb"
  2670.                doc.Save True,True          
  2671.           End If
  2672.      Else
  2673.           Msgbox "This document is a help document."
  2674.      End If
  2675. End Sub
  2676. Internet Profiles
  2677. Internet Options
  2678. webserver
  2679.     12S13S
  2680. _Move To Folder...
  2681. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  2682. '++LotusScript Development Environment:2:5:(Forward):0:1
  2683. Declare Sub Click(Source As Button)
  2684. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2685. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2686. Private Sub BindEvents(Byval Objectname_ As String)
  2687.      Static Source As BUTTON
  2688.      Set Source = Bind(Objectname_)
  2689.      On Event Click From Source Call Click
  2690. End Sub
  2691. '++LotusScript Development Environment:2:2:Click:1:12
  2692. Sub Click(Source As Button)
  2693.      
  2694.      InstantiateWebBrowserFormObjects
  2695.      Dim webdoc As notesdocument
  2696.      Dim noteid As String
  2697.      noteid = ""
  2698.      
  2699.      Response = Msgbox ("This will permanently delete the selected page from the database.  Do you want to continue?", 20, "Delete Document")
  2700.      If Response = 6 Then    
  2701.           uidoc.close
  2702.           Set webdoc=db.getdocumentbyurl(doc.url(0))
  2703.           Call RemoveObjects(webdoc)
  2704.          ' webdoc.Remove True
  2705.           
  2706.           If doc.isuidocopen Then
  2707.                noteid = doc.noteid             
  2708.                Delete doc
  2709.                Set doc = db.getdocumentbyid (noteid) 
  2710.                doc.remove True
  2711.                w.viewrefresh  
  2712.                w.viewrefresh
  2713.           Else
  2714.                doc.Remove True 
  2715.           End If
  2716.           
  2717.           w.viewrefresh
  2718.           
  2719.           
  2720.           
  2721.      End If
  2722.      
  2723. End Sub
  2724. Categori_zeK
  2725. _Edit Document
  2726. Send Docu_ment
  2727. _Forward
  2728. $ControlURLNavigateK'++LotusScript Development Environment:2:5:(Options):0:66
  2729. '++LotusScript Development Environment:2:5:(Forward):0:1
  2730. Declare Sub Click(Source As Button)
  2731. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2732. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2733. Private Sub BindEvents(Byval Objectname_ As String)
  2734.      Static Source As BUTTON
  2735.      Set Source = Bind(Objectname_)
  2736.      On Event Click From Source Call Click
  2737. End Sub
  2738. '++LotusScript Development Environment:2:2:Click:1:12
  2739. Sub Click(Source As Button)
  2740.      
  2741.      InstantiateWebBrowserFormObjects
  2742.      Dim URL As Variant
  2743.      Dim Reload As Variant
  2744.      Dim Flags As Integer
  2745.      Dim TmpUrl As String
  2746.      
  2747.      URL = doc.GetitemValue("$NavigateToURL")
  2748.      Reload = doc.GetItemValue("$ReloadRefresh")
  2749.      Flags =Val (Reload(0))
  2750.      On Error 213  Resume Next
  2751.      
  2752.      TmpUrl=browserobject.LocationURL
  2753.      
  2754.      If Flags = 1 Then
  2755.           Flags = 4
  2756.      End If
  2757.      
  2758.      
  2759.      If URL(0) <> "" Then
  2760.           If URL(0) = TmpUrl Then
  2761.               ' Print "Refreshing " + Url(0)
  2762.                browserobject.Refresh     
  2763.           Else
  2764.              '  Print "Attempting " + URL(0) + " Flags = "+ Str(Flags)
  2765.                browserobject.Navigate URL(0), Flags
  2766.                
  2767.           ' Once navigation is done delete the item form the form
  2768.                doc.REMOVEITEM("$NavigateToURL")
  2769.                doc.RemoveItem("$ReloadRefresh")
  2770.                Call doc.Save( True, False )
  2771.           End If
  2772.      Else
  2773.           Messagebox "No URL specified.", 0, "ErrorNavigating"
  2774.      End If     
  2775. End Sub
  2776. _Remove From FolderK
  2777. Open History FolderK
  2778. Import Microsoft Favorites...
  2779. '++LotusScript Development Environment:2:5:(Options):0:66
  2780. '++LotusScript Development Environment:2:5:(Forward):0:1
  2781. Declare Sub Click(Source As Button)
  2782. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2783. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2784. Private Sub BindEvents(Byval Objectname_ As String)
  2785.      Static Source As BUTTON
  2786.      Set Source = Bind(Objectname_)
  2787.      On Event Click From Source Call Click
  2788. End Sub
  2789. '++LotusScript Development Environment:2:2:Click:1:12
  2790. Sub Click(Source As Button)
  2791.      
  2792.      ImportFavorites
  2793. End Sub
  2794. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  2795. '++LotusScript Development Environment:2:5:(Forward):0:1
  2796. Declare Sub Click(Source As Button)
  2797. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2798. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2799. Private Sub BindEvents(Byval Objectname_ As String)
  2800.      Static Source As BUTTON
  2801.      Set Source = Bind(Objectname_)
  2802.      On Event Click From Source Call Click
  2803. End Sub
  2804. '++LotusScript Development Environment:2:2:Click:1:12
  2805. Sub Click(Source As Button)
  2806.      
  2807.      ImportBookmarks
  2808. End Sub
  2809. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  2810. '++LotusScript Development Environment:2:5:(Forward):0:1
  2811. Declare Sub Click(Source As Button)
  2812. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2813. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2814. Private Sub BindEvents(Byval Objectname_ As String)
  2815.      Static Source As BUTTON
  2816.      Set Source = Bind(Objectname_)
  2817.      On Event Click From Source Call Click
  2818. End Sub
  2819. '++LotusScript Development Environment:2:2:Click:1:12
  2820. Sub Click(Source As Button)
  2821.      
  2822.      Dim iret As Integer
  2823.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  2824. End Sub
  2825.     0S0E
  2826. Add Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  2827. '++LotusScript Development Environment:2:5:(Forward):0:1
  2828. Declare Sub Click(Source As Button)
  2829. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2830. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2831. Private Sub BindEvents(Byval Objectname_ As String)
  2832.      Static Source As BUTTON
  2833.      Set Source = Bind(Objectname_)
  2834.      On Event Click From Source Call Click
  2835. End Sub
  2836. '++LotusScript Development Environment:2:2:Click:1:12
  2837. Sub Click(Source As Button)
  2838.      
  2839.      InstantiateWebBrowserFormObjects
  2840.      Dim bookmarkinfo As Variant
  2841.      Dim bookmark As New notesdocument(db)
  2842.      Dim folder As String
  2843.      Dim webdoc As notesdocument
  2844.      
  2845.      BookmarkInfo = w.addbookmark(browserobject.Locationname)
  2846.      If Isarray(bookmarkinfo) Then
  2847.           If bookmarkinfo(0) = "0" Then
  2848.                'Create a bookmark only.  Do not retrieve the page
  2849.                bookmark.bookmark = "1"
  2850.                bookmark.title = bookmarkinfo(1)
  2851.                bookmark.url = browserobject.locationurl
  2852.                bookmark.save True, False
  2853.                bookmark.putinfolder(bookmarkinfo(2))
  2854.           Elseif bookmarkinfo(0) = "1" Then
  2855.                'create copy of page 
  2856.                Set webdoc = db.getdocumentbyurl(browserobject.locationurl)                 
  2857.                webdoc.title = bookmarkinfo(1)
  2858.                webdoc.save True, False
  2859.                webdoc.putinfolder(bookmarkinfo(2))
  2860.           End If
  2861.           
  2862.      End If
  2863. End Sub
  2864. Go to BookmarksK'++LotusScript Development Environment:2:5:(Options):0:66
  2865. '++LotusScript Development Environment:2:5:(Forward):0:1
  2866. Declare Sub Click(Source As Button)
  2867. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2868. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2869. Private Sub BindEvents(Byval Objectname_ As String)
  2870.      Static Source As BUTTON
  2871.      Set Source = Bind(Objectname_)
  2872.      On Event Click From Source Call Click
  2873. End Sub
  2874. '++LotusScript Development Environment:2:2:Click:1:12
  2875. Sub Click(Source As Button)
  2876.      InstantiateWebBrowserFormObjects
  2877.      Call w.opendatabase(db.server, db.filepath, "Favorites and Bookmarks", "",False)
  2878. End Sub
  2879. O=Lotus Notes
  2880. O=Lotus Notes
  2881. PURSAFO
  2882. |.:#U
  2883. O=Lotus Notes
  2884. CN=Lotus Notes Template Development/O=Lotus Notes
  2885. PURSAFO
  2886. Fde!f^^
  2887. $FILE
  2888. EXT61806.lss
  2889. $FILE
  2890. EXT61806.lso
  2891. $SCRIPTOBJ_26
  2892. $FILE
  2893. EXT34422.lss
  2894. $FILE
  2895. EXT34422.lso
  2896. $FILE
  2897. STG27910
  2898. $FILE
  2899. EXT34422
  2900. $OLEOBJINFO
  2901. $TITLE
  2902. $INFO
  2903. $WINDOWTITLE
  2904. $Script
  2905. $$Script_O
  2906. $$ScriptName
  2907. $$FormScript
  2908. $$$FormScript_O
  2909. $BODY
  2910. $ACTIONS
  2911. $SCRIPTOBJ_0
  2912. $SCRIPTOBJ_1
  2913. $SCRIPTOBJ_2
  2914. $SCRIPTOBJ_3
  2915. $SCRIPTOBJ_4
  2916. $SCRIPTOBJ_5
  2917. $SCRIPTOBJ_6
  2918. $SCRIPTOBJ_7
  2919. $SCRIPTOBJ_8
  2920. $SCRIPTOBJ_9
  2921. $SCRIPTOBJ_11
  2922. $SCRIPTOBJ_13
  2923. $SCRIPTOBJ_18
  2924. $SCRIPTOBJ_21
  2925. $SCRIPTOBJ_22
  2926. $SCRIPTOBJ_23
  2927. $SCRIPTOBJ_24
  2928. $SCRIPTOBJ_25
  2929. EOu#B 
  2930. (WebBrowserView)|WebBrowserView
  2931. www.G
  2932. www.`
  2933.     15S18S27S30S
  2934. $34Title$Conflict
  2935. WebBrowserForm
  2936.     L1S1
  2937.  $34v
  2938. www.G
  2939. www.`
  2940.     15S18S27S30S
  2941. TitleDocument Title&
  2942. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##########################################################
  2943. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  2944. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  2945. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  2946. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  2947. All Pages|($All)|Main
  2948. www.G
  2949. www.`
  2950.     15S18S36S39S
  2951. $44Title$36$Conflict
  2952. HTMLForm
  2953. $Title
  2954. HTMLFormDoc
  2955. Guided Tour
  2956. DeferredObject
  2957. Title
  2958. BLANK.HTM
  2959. bookmark
  2960.     L1S21S
  2961. www.G
  2962. www.`
  2963.     15S18S36S39S
  2964. ?TitlePage Title$36Date
  2965. Admin
  2966. Admin
  2967. forward
  2968. HTMLForm
  2969. WebBrowserForm
  2970.     12S13S
  2971. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes####################
  2972. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  2973. HelpFormHD
  2974. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################
  2975. ##########################################################
  2976. ##########################################################
  2977. ,D    } 
  2978. ^t    K,
  2979. Nt    PD
  2980. _Forward    
  2981. Categori_zex
  2982. _Edit Document
  2983. Send Docu_ment
  2984. _Move to Folder...
  2985. _Remove from Folder...
  2986. >|'++LotusScript Development Environment:2:5:(Options):0:74
  2987. Option Public
  2988. Use "InternetFunctions"
  2989. '++LotusScript Development Environment:2:5:(Forward):0:1
  2990. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2991. '++LotusScript Development Environment:2:5:(Options):0:66
  2992. '++LotusScript Development Environment:2:5:(Forward):0:1
  2993. Declare Sub Postopen(Source As Notesuiview)
  2994. Declare Sub Initialize
  2995. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2996. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2997. Private Sub BindEvents(Byval Objectname_ As String)
  2998.      Static Source As NOTESUIVIEW
  2999.      Set Source = Bind(Objectname_)
  3000.      On Event Postopen From Source Call Postopen
  3001. End Sub
  3002. '++LotusScript Development Environment:2:2:Postopen:1:12
  3003. Sub Postopen(Source As Notesuiview)
  3004.      InstantiateObjects
  3005. End Sub
  3006. '++LotusScript Development Environment:2:2:Initialize:1:10
  3007. Sub Initialize
  3008.      ' Create a Browser form
  3009.      
  3010.      
  3011.      
  3012. End Sub
  3013. O=Lotus Notes
  3014. O=Lotus Notes
  3015. PURSAFO
  3016. |.:#U
  3017. O=Lotus Notes
  3018. CN=Lotus Notes Template Development/O=Lotus Notes
  3019. PURSAFO
  3020. Fde!f^^
  3021. $SCRIPTOBJ_19
  3022. $SCRIPTOBJ_20
  3023. $SCRIPTOBJ_7
  3024. $SCRIPTOBJ_9
  3025. $SCRIPTOBJ_10
  3026. $SCRIPTOBJ_18
  3027. $TITLE
  3028. $Index
  3029. $Formula
  3030. $FormulaClass
  3031. $VIEWFORMAT
  3032. $Comment
  3033. $ACTIONS
  3034. $ViewGlobalScript
  3035. $ViewScript
  3036. $ViewScript_O
  3037. '++LotusScript Development Environment:2:5:(Options):0:74
  3038. Option Public
  3039. Use "AgentFunctions"
  3040. '++LotusScript Development Environment:2:5:(Forward):0:1
  3041. Declare Sub Initialize
  3042. Declare Sub ReduceDocumentsToLinks
  3043. Declare Sub RemoveDocumentsFromDatabase
  3044. Declare Sub SetupExpirationDates
  3045. Declare Function DocumentCanBeProcessed  As Integer
  3046. Declare Sub ReduceOneDocumentToLink
  3047. '++LotusScript Development Environment:2:5:(Declarations):0:10
  3048. Dim housekeepingagent As notesagent
  3049. Dim docCollection As NotesDocumentCollection
  3050. Dim urldoc As NotesDocument
  3051. Dim doc As NotesDocument
  3052. Dim dtExpiration As NotesDateTime
  3053. Dim dtLastAccessed As NotesDateTime
  3054. '++LotusScript Development Environment:2:2:Initialize:1:10
  3055. Sub Initialize
  3056.      On Error Goto ProcessError
  3057.      InstantiateAgentObjects
  3058.      
  3059.      'Open the error log for error handling
  3060.      Set HousekeepingAgent = Session.currentagent
  3061.      Set AgentLog = OpenLog(HousekeepingAgent.name)
  3062.      
  3063.      If LogLocation = "Agent Log" Then agentLog.LogErrors = True   
  3064.      Call logaction( "Starting Housekeeping agent.....")
  3065.      
  3066.       'check to see if we need to perform and database/document cleanup
  3067.      If (docprofile.ReduceDays(0) = "0") Then
  3068.           ReduceDocumentsToLinks
  3069.      Elseif (docprofile.ReduceDays(0) = "1") Then
  3070.           RemoveDocumentsFromDatabase
  3071.      End If
  3072.      Goto Cleanup
  3073.      
  3074. ProcessError:
  3075.      Call logerror(Err, Error$)
  3076.      Call logaction("The preceeding error occurred in the Initialization routine of the Housekeeping Agent.")
  3077.      Resume Next     
  3078. Cleanup:
  3079.      Call logaction("Housekeeping Agent finished."     )
  3080.      If LogLocation = "Agent Log" Then  Call agentlog.close
  3081.      
  3082. End Sub
  3083. '++LotusScript Development Environment:2:2:ReduceDocumentsToLinks:1:8
  3084. Sub ReduceDocumentsToLinks
  3085.      On Error Goto ProcessError
  3086.      SetupExpirationDates
  3087.      
  3088.      Set docCollection = db.AllDocuments
  3089.      Set doc = docCollection.GetFirstDocument
  3090.      While Not (doc Is Nothing)
  3091.           If (DocumentCanBeProcessed) Then ReduceOneDocumentToLink
  3092.           Set doc = docCollection.GetNextDocument(doc)
  3093.      Wend
  3094.      Exit Sub
  3095. ProcessError:
  3096.      Call logerror(Err, Error$)
  3097.      Call logaction("The preceeding error occurred in the ReduceDocumentsToLinks routine of the Housekeeping Agent.")
  3098.      Resume Next 
  3099.      
  3100. End Sub
  3101. '++LotusScript Development Environment:2:2:RemoveDocumentsFromDatabase:1:8
  3102. Sub RemoveDocumentsFromDatabase
  3103.      On Error Goto ProcessError
  3104.      SetupExpirationDates
  3105.      Set docCollection = db.AllDocuments
  3106.      For i = 1 To docCollection.Count
  3107.           Set doc = docCollection.GetNthDocument(i)          
  3108.           If (DocumentCanBeProcessed) Then 
  3109.                Call RemoveObjects(doc)
  3110.                Call logaction( "Removing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days...")
  3111.                doc.Remove True
  3112.           End If               
  3113.      Next
  3114.      Exit Sub
  3115.      
  3116. ProcessError:
  3117.      Call logerror(Err, Error$)
  3118.      Call logaction("The preceeding error occurred in the RemoveDocumentsFromDatabase routine of the Housekeeping Agent.")
  3119.      Resume Next 
  3120.      
  3121. End Sub
  3122. '++LotusScript Development Environment:2:2:SetupExpirationDates:1:8
  3123. Sub SetupExpirationDates
  3124.      On Error Goto ProcessError
  3125. 'initiate the date/time objects
  3126.      Set dtLastAccessed = New NotesDateTime("")
  3127.      Set dtExpiration = New NotesDateTime("")
  3128.      dtLastAccessed.SetNow
  3129.      dtExpiration.SetNow
  3130. 'dtExpired must be set back the number of days specified in the profile document
  3131.      dtExpiration.AdjustDay(-1*Cint(docprofile.ReduceNumDays(0)))
  3132.      Exit Sub
  3133. ProcessError:
  3134.      Call logerror(Err, Error$)
  3135.      Call logaction("The preceeding error occurred in the SetExpirationDates routine of the Housekeeping Agent.")
  3136.      Resume Next 
  3137. End Sub
  3138. '++LotusScript Development Environment:2:1:DocumentCanBeProcessed:1:8
  3139. Function DocumentCanBeProcessed  As Integer
  3140.      On Error Goto ProcessError
  3141. 'determines if a document meets the criteria to be reduced or removed from the database
  3142.      If (doc.Form(0) = "Admin") Then 
  3143.           DocumentCanBeProcessed = False
  3144.           Exit Function
  3145.      End If
  3146. 'if this is the home page, do not process it
  3147.      If (doc.Url(0) = docprofile.OpenUrl(0)) Then
  3148.           DocumentCanBeProcessed = False
  3149.           Exit Function          
  3150.      End If
  3151.      'if this page is a Web Browser Object page, do not process it
  3152.      If (doc.form(0) = "WebBrowserForm") Then
  3153.           documentcanbeprocessed = False
  3154.           Exit Function
  3155.      End If
  3156. 'compare the last accessed date/time
  3157.      dtLastAccessed.LSLocalTime = doc.LastAccessed
  3158.      If (dtExpiration.TimeDifference(dtLastAccessed) > 0) Then DocumentCanBeProcessed = True
  3159.      Exit Function
  3160. ProcessError:
  3161.      Call logerror(Err, Error$)
  3162.      Call logaction("The preceeding error occurred in the DocumentCanBeProcessed routine of the Housekeeping Agent.")
  3163.      Resume Next 
  3164. End Function
  3165. '++LotusScript Development Environment:2:2:ReduceOneDocumentToLink:1:8
  3166. Sub ReduceOneDocumentToLink
  3167.      On Error Goto ProcessError
  3168.      
  3169.      Call logaction( "Reducing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days...")
  3170.      doc.RemoveItem "Body"
  3171.      doc.RemoveItem "HTMLSouce"
  3172.      doc.RemoveItem "HTMLBody"
  3173.      doc.RemoveItem "$Background"
  3174.      doc.RemoveItem "$FILE"
  3175.      doc.RemoveItem "URLLinks1"
  3176.      doc.RemoveItem "WebAheadStatus"
  3177.      doc.RemoveItem "WebAgentError"
  3178.      doc.RemoveItem "PageMinderStatus"
  3179.      doc.Save True,True
  3180.      Exit Sub
  3181.      
  3182. ProcessError:
  3183.      Call logerror(Err, Error$)
  3184.      Call logaction("The preceeding error occurred in the ReduceOneDocumentToLink routine of the Housekeeping Agent.")
  3185.      Resume Next 
  3186. End Sub
  3187. O=Lotus Notes
  3188. O=Lotus Notes
  3189. PURSAFO
  3190. |.:#U
  3191. O=Lotus Notes
  3192. CN=Lotus Notes Template Development/O=Lotus Notes
  3193. PURSAFO
  3194. Fde!f^^
  3195. {>HX!
  3196. $TITLE
  3197. $AssistType
  3198. $AssistLastRun
  3199. $AssistDocCount
  3200. $AssistFlags
  3201. $AssistTrigger
  3202. $AssistInfo
  3203. $AssistQuery
  3204. $AssistAction
  3205. $AssistAction_Ex
  3206. O=Lotus Notes
  3207. O=Lotus Notes
  3208. PURSAFO
  3209. |.:#U
  3210. O=Lotus Notes
  3211. CN=Lotus Notes Template Development/O=Lotus Notes
  3212. PURSAFO
  3213. Fde!f^^
  3214. sZ%!ZM}
  3215. %68E;
  3216. I8sL;r
  3217. $Flags
  3218. O=Lotus Notes
  3219. O=Lotus Notes
  3220. PURSAFO
  3221. |.:#U
  3222. O=Lotus Notes
  3223. CN=Lotus Notes Template Development/O=Lotus Notes
  3224. PURSAFO
  3225. Fde!f^^
  3226. sZ%!ZM}
  3227. $Flags
  3228. O=Lotus Notes
  3229. O=Lotus Notes
  3230. PURSAFO
  3231. |.:#U
  3232. O=Lotus Notes
  3233. CN=Lotus Notes Template Development/O=Lotus Notes
  3234. PURSAFO
  3235. Fde!f^^
  3236. sZ%!ZM}
  3237. $Flags
  3238.     0S0E
  3239.     0S0E
  3240.     0S0E
  3241.     0S0E
  3242. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  3243. '++LotusScript Development Environment:2:5:(Forward):0:1
  3244. Declare Sub Click(Source As Button)
  3245. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3246. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3247. Private Sub BindEvents(Byval Objectname_ As String)
  3248.      Static Source As BUTTON
  3249.      Set Source = Bind(Objectname_)
  3250.      On Event Click From Source Call Click
  3251. End Sub
  3252. '++LotusScript Development Environment:2:2:Click:1:12
  3253. Sub Click(Source As Button)
  3254.      
  3255.      Browse
  3256. End Sub
  3257. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  3258. '++LotusScript Development Environment:2:5:(Forward):0:1
  3259. Declare Sub Click(Source As Button)
  3260. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3261. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3262. Private Sub BindEvents(Byval Objectname_ As String)
  3263.      Static Source As BUTTON
  3264.      Set Source = Bind(Objectname_)
  3265.      On Event Click From Source Call Click
  3266. End Sub
  3267. '++LotusScript Development Environment:2:2:Click:1:12
  3268. Sub Click(Source As Button)
  3269.      
  3270.      viewdelete
  3271.      
  3272. End Sub
  3273. _ReloadK(
  3274.     0S0E
  3275.     0S0E
  3276. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  3277. '++LotusScript Development Environment:2:5:(Forward):0:1
  3278. Declare Sub Click(Source As Button)
  3279. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3280. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3281. Private Sub BindEvents(Byval Objectname_ As String)
  3282.      Static Source As BUTTON
  3283.      Set Source = Bind(Objectname_)
  3284.      On Event Click From Source Call Click
  3285. End Sub
  3286. '++LotusScript Development Environment:2:2:Click:1:12
  3287. Sub Click(Source As Button)
  3288.      
  3289.      PrintWebDocument
  3290. End Sub
  3291. _SearchK'++LotusScript Development Environment:2:5:(Options):0:66
  3292. '++LotusScript Development Environment:2:5:(Forward):0:1
  3293. Declare Sub Click(Source As Button)
  3294. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3295. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3296. Private Sub BindEvents(Byval Objectname_ As String)
  3297.      Static Source As BUTTON
  3298.      Set Source = Bind(Objectname_)
  3299.      On Event Click From Source Call Click
  3300. End Sub
  3301. '++LotusScript Development Environment:2:2:Click:1:12
  3302. Sub Click(Source As Button)
  3303.      
  3304.      Dim docLocal As NotesDocument
  3305.      Dim browserobject As Variant
  3306.      Dim objectitem As notesrichtextitem
  3307.      
  3308.      Dim docCollection As NotesDocumentCollection     
  3309.      Set docCollection = db.UnprocessedDocuments
  3310.      If (docCollection.Count = 0) Then
  3311.           Msgbox "You must select a document.",16,"Error"
  3312.           Exit Sub
  3313.      End If
  3314.      Set docLocal = docCollection.GetFirstDocument
  3315.      If docLocal.Form(0) = "WebBrowserForm" Then
  3316.           Set objectitem = docLocal.getfirstitem("Browser")
  3317.           browserobject = objectitem.getembeddedobject("Browser")
  3318.           IESearch(browserobject)
  3319.      Else
  3320.           OpenSearchSite docLocal
  3321.      End If
  3322.      
  3323. End Sub
  3324. _Forward
  3325. Sh_are...
  3326. '++LotusScript Development Environment:2:5:(Options):0:66
  3327. '++LotusScript Development Environment:2:5:(Forward):0:1
  3328. Declare Sub Click(Source As Button)
  3329. Declare Function GetInternetProfile
  3330. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3331. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3332. Private Sub BindEvents(Byval Objectname_ As String)
  3333.      Static Source As BUTTON
  3334.      Set Source = Bind(Objectname_)
  3335.      On Event Click From Source Call Click
  3336. End Sub
  3337. '++LotusScript Development Environment:2:2:Click:1:12
  3338. Sub Click(Source As Button)
  3339.      
  3340.      Dim docLocal As NotesDocument
  3341.      Dim webdoc As notesdocument
  3342.      Dim docCollection As NotesDocumentCollection     
  3343.      Set docCollection = db.UnprocessedDocuments
  3344.      If (docCollection.Count = 0) Then
  3345.           Msgbox "You must select a document.",16,"Error"
  3346.           Exit Sub
  3347.      End If
  3348.      Set docLocal = docCollection.GetFirstDocument
  3349.      If docLocal.hasitem("URL") Then
  3350.           docLocal.tmpWebServer  = docProfile.WebServer
  3351.           docLocal.tmpWebDb = docProfile.WebDatabase
  3352.           docLocal.Save True, True
  3353.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  3354.                docLocal.Save True, True
  3355.                Select Case docLocal.SharedOptions(0)
  3356.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  3357.                Case "2" : 'user wants to copy this to the shared web database
  3358.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3359.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  3360.                     Else
  3361.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  3362.                     End If
  3363.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  3364.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3365.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.Locationname
  3366.                     Else
  3367.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  3368.                     End If
  3369.                End Select
  3370.           'remove any remaining fields that don't need to be carried around
  3371.                docLocal.removeItem "ForwardTo"
  3372.                docLocal.RemoveItem "SharedOptions" 
  3373.                docLocal.RemoveItem "Rating"
  3374.                docLocal.removeItem "Content"
  3375.                docLocal.removeItem "Comments"
  3376.           End If     
  3377.           docLocal.RemoveItem "tmpWebServer"
  3378.           docLocal.RemoveItem "tmpWebDb"
  3379.           docLocal.Save True, True
  3380.      Else
  3381.           Msgbox "This document does not contain a URL."
  3382.      End If
  3383. End Sub
  3384. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  3385. Function GetInternetProfile
  3386.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  3387.      Set view = db.getView("(Internet Profile)")
  3388.      Set GetInternetProfile = view.GetFirstDocument
  3389. End Function
  3390. Internet Profiles
  3391. Internet Options
  3392. WebServer
  3393.     0S0E
  3394. _Move to Folder...
  3395. Categori_zeK
  3396. _Edit Document
  3397. Send Docu_ment
  3398. Move Page to Folder... 
  3399.     0S0E
  3400. _Remove from Folder...
  3401. _Reduce to BookmarkK'++LotusScript Development Environment:2:5:(Options):0:66
  3402. '++LotusScript Development Environment:2:5:(Forward):0:1
  3403. Declare Sub Click(Source As Button)
  3404. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3405. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3406. Private Sub BindEvents(Byval Objectname_ As String)
  3407.      Static Source As BUTTON
  3408.      Set Source = Bind(Objectname_)
  3409.      On Event Click From Source Call Click
  3410. End Sub
  3411. '++LotusScript Development Environment:2:2:Click:1:12
  3412. Sub Click(Source As Button)
  3413.      
  3414.      Dim docCollection As NotesDocumentCollection
  3415.      Dim docLocal As NotesDocument
  3416.      
  3417.      Set docCollection = db.UnprocessedDocuments
  3418.      If (docCollection.Count = 0) Then
  3419.           Msgbox "You must select a document.",16,"Error"
  3420.           Exit Sub
  3421.      End If
  3422.      Set docLocal = docCollection.GetFirstDocument
  3423.      While Not (docLocal Is Nothing)
  3424.           RemoveObjects docLocal
  3425.           ReduceToLink docLocal
  3426.           Set docLocal = docCollection.GetNextDocument(docLocal)
  3427.      Wend
  3428. End Sub
  3429. Open History FolderK
  3430. Import Microsoft Favorites...
  3431. '++LotusScript Development Environment:2:5:(Options):0:66
  3432. '++LotusScript Development Environment:2:5:(Forward):0:1
  3433. Declare Sub Click(Source As Button)
  3434. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3435. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3436. Private Sub BindEvents(Byval Objectname_ As String)
  3437.      Static Source As BUTTON
  3438.      Set Source = Bind(Objectname_)
  3439.      On Event Click From Source Call Click
  3440. End Sub
  3441. '++LotusScript Development Environment:2:2:Click:1:12
  3442. Sub Click(Source As Button)
  3443.      
  3444.      ImportFavorites
  3445. End Sub
  3446. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  3447. '++LotusScript Development Environment:2:5:(Forward):0:1
  3448. Declare Sub Click(Source As Button)
  3449. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3450. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3451. Private Sub BindEvents(Byval Objectname_ As String)
  3452.      Static Source As BUTTON
  3453.      Set Source = Bind(Objectname_)
  3454.      On Event Click From Source Call Click
  3455. End Sub
  3456. '++LotusScript Development Environment:2:2:Click:1:12
  3457. Sub Click(Source As Button)
  3458.      
  3459.      ImportBookmarks
  3460. End Sub
  3461. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  3462. '++LotusScript Development Environment:2:5:(Forward):0:1
  3463. Declare Sub Click(Source As Button)
  3464. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3465. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3466. Private Sub BindEvents(Byval Objectname_ As String)
  3467.      Static Source As BUTTON
  3468.      Set Source = Bind(Objectname_)
  3469.      On Event Click From Source Call Click
  3470. End Sub
  3471. '++LotusScript Development Environment:2:2:Click:1:12
  3472. Sub Click(Source As Button)
  3473.      
  3474.      Dim iret As Integer
  3475.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  3476. End Sub
  3477.     0S0E
  3478. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  3479. '++LotusScript Development Environment:2:5:(Forward):0:1
  3480. Declare Sub Click(Source As Button)
  3481. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3482. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3483. Private Sub BindEvents(Byval Objectname_ As String)
  3484.      Static Source As BUTTON
  3485.      Set Source = Bind(Objectname_)
  3486.      On Event Click From Source Call Click
  3487. End Sub
  3488. '++LotusScript Development Environment:2:2:Click:1:12
  3489. Sub Click(Source As Button)
  3490.      
  3491.      Dim docLocal As NotesDocument
  3492.      Dim docCollection As NotesDocumentCollection     
  3493.      Set docCollection = db.UnprocessedDocuments
  3494.      If (docCollection.Count = 0) Then
  3495.           Msgbox "You must select a document.",16,"Error"
  3496.           Exit Sub
  3497.      Else
  3498.           For j = 1 To docCollection.Count
  3499.                Set docLocal = docCollection.getnthdocument(j)               
  3500.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  3501.                     Select Case docLocal.ForwardOptions(0)
  3502.                     Case "1" : 'user wants to forward the URL only
  3503.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  3504.                     Case "2" : 'user wants to send entire page
  3505.                          Call  ViewForward(docLocal)
  3506.                     End Select
  3507.           'remove any remaining fields that don't need to be carried around
  3508.                     docLocal.RemoveItem "ForwardOptions" 
  3509.                     docLocal.save True, False
  3510.                     
  3511.                End If
  3512.                Exit Sub
  3513.           Next
  3514.      End If
  3515.      Exit Sub
  3516. End Sub
  3517. '++LotusScript Development Environment:2:5:(Options):0:74
  3518. Option Public
  3519. Use "InternetFunctions"
  3520. '++LotusScript Development Environment:2:5:(Forward):0:1
  3521. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3522. '++LotusScript Development Environment:2:5:(Options):0:66
  3523. '++LotusScript Development Environment:2:5:(Forward):0:1
  3524. Declare Sub Postopen(Source As Notesuiview)
  3525. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  3526. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3527. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3528. Private Sub BindEvents(Byval Objectname_ As String)
  3529.      Static Source As NOTESUIVIEW
  3530.      Set Source = Bind(Objectname_)
  3531.      On Event Postopen From Source Call Postopen
  3532.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  3533. End Sub
  3534. '++LotusScript Development Environment:2:2:Postopen:1:12
  3535. Sub Postopen(Source As Notesuiview)
  3536.      InstantiateObjects
  3537. End Sub
  3538. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  3539. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  3540.      Call MoveToFolder(source,target,continue)
  3541. End Sub
  3542. O=Lotus Notes
  3543. O=Lotus Notes
  3544. PURSAFO
  3545. |.:#U
  3546. O=Lotus Notes
  3547. CN=Lotus Notes Template Development/O=Lotus Notes
  3548. PURSAFO
  3549. Fde!f^^
  3550. o9wZ"n%;
  3551. $SCRIPTOBJ_22
  3552. $TITLE
  3553. $Index
  3554. $Formula
  3555. $FormulaClass
  3556. $VIEWFORMAT
  3557. $FormFormula
  3558. $Comment
  3559. $ACTIONS
  3560. $SCRIPTOBJ_2
  3561. $SCRIPTOBJ_3
  3562. $SCRIPTOBJ_6
  3563. $SCRIPTOBJ_7
  3564. $SCRIPTOBJ_9
  3565. $SCRIPTOBJ_16
  3566. $SCRIPTOBJ_18
  3567. $SCRIPTOBJ_19
  3568. $SCRIPTOBJ_20
  3569. $SCRIPTOBJ_21
  3570. $ViewGlobalScript
  3571. $ViewGlobalScript_O
  3572. $ViewScript
  3573. $ViewScript_O
  3574. O=Lotus Notes
  3575. O=Lotus Notes
  3576. PURSAFO
  3577. |.:#U
  3578. O=Lotus Notes
  3579. CN=Lotus Notes Template Development/O=Lotus Notes
  3580. PURSAFO
  3581. Fde!f^^
  3582. sZ%!ZM}
  3583. $Flags
  3584. All Bookmarks
  3585. www.G
  3586. www.`
  3587.     15S18S36S39S
  3588. $44Title$36$Conflict
  3589. Bookmark
  3590.     L1S1
  3591. Title
  3592. www.G
  3593. www.`
  3594.     15S18S36S39S
  3595. Q@TitlePage Title$36Date
  3596. Admin
  3597. Admin
  3598. forward
  3599. HTMLForm
  3600. WebBrowserForm
  3601.     12S13S
  3602. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#####################################
  3603. Web Bots\Page MinderWeb Bots\Page Minder
  3604. Bookmark
  3605. HelpForm
  3606. PageMinderStatus
  3607. PageMinderStatus
  3608. PageMinderStatus
  3609. PageMinderStatus
  3610. PageMinderStatus
  3611.     6S9S10S
  3612. $39Title$36URL$Conflict
  3613. $39Title
  3614. Title
  3615. Bookmark
  3616. HelpForm
  3617. PageMinderStatus
  3618. PageMinderStatus
  3619. PageMinderStatus
  3620. PageMinderStatus
  3621. PageMinderStatus
  3622.     6S9S10STitlePageTitle$36Date
  3623. URLURL&
  3624. Admin
  3625. Admin
  3626. forward
  3627. HTMLForm
  3628. HelpForm
  3629. HelpForm
  3630. WebBrowserForm
  3631.     12S13S23S24S25S3FY
  3632. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  3633. ##########################################################
  3634. Web Ahead
  3635. 1SfL3
  3636. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  3637. ##########################################################
  3638.     0S0E
  3639.     0S0E
  3640.     0S0E
  3641.     0S0E
  3642. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  3643. '++LotusScript Development Environment:2:5:(Forward):0:1
  3644. Declare Sub Click(Source As Button)
  3645. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3646. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3647. Private Sub BindEvents(Byval Objectname_ As String)
  3648.      Static Source As BUTTON
  3649.      Set Source = Bind(Objectname_)
  3650.      On Event Click From Source Call Click
  3651. End Sub
  3652. '++LotusScript Development Environment:2:2:Click:1:12
  3653. Sub Click(Source As Button)
  3654.      Browse
  3655. End Sub
  3656. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  3657. '++LotusScript Development Environment:2:5:(Forward):0:1
  3658. Declare Sub Click(Source As Button)
  3659. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3660. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3661. Private Sub BindEvents(Byval Objectname_ As String)
  3662.      Static Source As BUTTON
  3663.      Set Source = Bind(Objectname_)
  3664.      On Event Click From Source Call Click
  3665. End Sub
  3666. '++LotusScript Development Environment:2:2:Click:1:12
  3667. Sub Click(Source As Button)
  3668.      ViewDelete
  3669. End Sub
  3670. _ReloadK(
  3671.     0S0E
  3672.     0S0E
  3673. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  3674. '++LotusScript Development Environment:2:5:(Forward):0:1
  3675. Declare Sub Click(Source As Button)
  3676. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3677. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3678. Private Sub BindEvents(Byval Objectname_ As String)
  3679.      Static Source As BUTTON
  3680.      Set Source = Bind(Objectname_)
  3681.      On Event Click From Source Call Click
  3682. End Sub
  3683. '++LotusScript Development Environment:2:2:Click:1:12
  3684. Sub Click(Source As Button)
  3685.      PrintWebDocument
  3686. End Sub
  3687. _SearchK'++LotusScript Development Environment:2:5:(Options):0:66
  3688. '++LotusScript Development Environment:2:5:(Forward):0:1
  3689. Declare Sub Click(Source As Button)
  3690. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3691. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3692. Private Sub BindEvents(Byval Objectname_ As String)
  3693.      Static Source As BUTTON
  3694.      Set Source = Bind(Objectname_)
  3695.      On Event Click From Source Call Click
  3696. End Sub
  3697. '++LotusScript Development Environment:2:2:Click:1:12
  3698. Sub Click(Source As Button)
  3699.      Dim docLocal As NotesDocument
  3700.      Dim browserobject As Variant
  3701.      Dim objectitem As notesrichtextitem
  3702.      
  3703.      Dim docCollection As NotesDocumentCollection     
  3704.      Set docCollection = db.UnprocessedDocuments
  3705.      If (docCollection.Count = 0) Then
  3706.           Msgbox "You must select a document.",16,"Error"
  3707.           Exit Sub
  3708.      End If
  3709.      Set docLocal = docCollection.GetFirstDocument
  3710.      If docLocal.Form(0) = "WebBrowserForm" Then
  3711.           Set objectitem = docLocal.getfirstitem("Browser")
  3712.           browserobject = objectitem.getembeddedobject("Browser")
  3713.           IESearch(browserobject)
  3714.      Else
  3715.           OpenSearchSite docLocal
  3716.      End If
  3717.      
  3718. End Sub
  3719. _Forward
  3720. Sh_are...
  3721. '++LotusScript Development Environment:2:5:(Options):0:66
  3722. '++LotusScript Development Environment:2:5:(Forward):0:1
  3723. Declare Sub Click(Source As Button)
  3724. Declare Function GetInternetProfile
  3725. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3726. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3727. Private Sub BindEvents(Byval Objectname_ As String)
  3728.      Static Source As BUTTON
  3729.      Set Source = Bind(Objectname_)
  3730.      On Event Click From Source Call Click
  3731. End Sub
  3732. '++LotusScript Development Environment:2:2:Click:1:12
  3733. Sub Click(Source As Button)
  3734.      Dim docLocal As NotesDocument
  3735.      Dim webdoc As notesdocument
  3736.      Dim docCollection As NotesDocumentCollection     
  3737.      Set docCollection = db.UnprocessedDocuments
  3738.      If (docCollection.Count = 0) Then
  3739.           Msgbox "You must select a document.",16,"Error"
  3740.           Exit Sub
  3741.      End If
  3742.      Set docLocal = docCollection.GetFirstDocument
  3743.      If docLocal.hasitem("URL") Then
  3744.           docLocal.tmpWebServer  = docProfile.WebServer
  3745.           docLocal.tmpWebDb = docProfile.WebDatabase
  3746.           docLocal.Save True, True
  3747.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  3748.                docLocal.Save True, True
  3749.                Select Case docLocal.SharedOptions(0)
  3750.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  3751.                Case "2" : 'user wants to copy this to the shared web database
  3752.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3753.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  3754.                     Else
  3755.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  3756.                     End If
  3757.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  3758.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3759.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.Locationname
  3760.                     Else
  3761.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  3762.                     End If
  3763.                End Select
  3764.           'remove any remaining fields that don't need to be carried around
  3765.                docLocal.removeItem "ForwardTo"
  3766.                docLocal.RemoveItem "SharedOptions" 
  3767.                docLocal.RemoveItem "Rating"
  3768.                docLocal.removeItem "Content"
  3769.                docLocal.removeItem "Comments"
  3770.           End If     
  3771.           docLocal.RemoveItem "tmpWebServer"
  3772.           docLocal.RemoveItem "tmpWebDb"
  3773.           docLocal.Save True, True
  3774.      Else
  3775.           Msgbox "This document does not contain a URL."
  3776.      End If
  3777. End Sub
  3778. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  3779. Function GetInternetProfile
  3780.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  3781.      Set view = db.getView("(Internet Profile)")
  3782.      Set GetInternetProfile = view.GetFirstDocument
  3783. End Function
  3784. Internet Profiles
  3785. Internet Options
  3786. WebServer
  3787.     0S0E
  3788. _Move to Folder...
  3789. Categori_zeK
  3790. _Edit Document
  3791. Send Docu_ment
  3792. Move Page to Folder... 
  3793.     0S0E
  3794. _Remove from Folder...
  3795. Import Microsoft Favorites...
  3796. '++LotusScript Development Environment:2:5:(Options):0:66
  3797. '++LotusScript Development Environment:2:5:(Forward):0:1
  3798. Declare Sub Click(Source As Button)
  3799. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3800. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3801. Private Sub BindEvents(Byval Objectname_ As String)
  3802.      Static Source As BUTTON
  3803.      Set Source = Bind(Objectname_)
  3804.      On Event Click From Source Call Click
  3805. End Sub
  3806. '++LotusScript Development Environment:2:2:Click:1:12
  3807. Sub Click(Source As Button)
  3808.      ImportFavorites
  3809. End Sub
  3810. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  3811. '++LotusScript Development Environment:2:5:(Forward):0:1
  3812. Declare Sub Click(Source As Button)
  3813. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3814. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3815. Private Sub BindEvents(Byval Objectname_ As String)
  3816.      Static Source As BUTTON
  3817.      Set Source = Bind(Objectname_)
  3818.      On Event Click From Source Call Click
  3819. End Sub
  3820. '++LotusScript Development Environment:2:2:Click:1:12
  3821. Sub Click(Source As Button)
  3822.      ImportBookmarks
  3823. End Sub
  3824. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  3825. '++LotusScript Development Environment:2:5:(Forward):0:1
  3826. Declare Sub Click(Source As Button)
  3827. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3828. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3829. Private Sub BindEvents(Byval Objectname_ As String)
  3830.      Static Source As BUTTON
  3831.      Set Source = Bind(Objectname_)
  3832.      On Event Click From Source Call Click
  3833. End Sub
  3834. '++LotusScript Development Environment:2:2:Click:1:12
  3835. Sub Click(Source As Button)
  3836.      Dim docLocal As NotesDocument
  3837.      Dim docCollection As NotesDocumentCollection     
  3838.      Set docCollection = db.UnprocessedDocuments
  3839.      If (docCollection.Count = 0) Then
  3840.           Msgbox "You must select a document.",16,"Error"
  3841.           Exit Sub
  3842.      Else
  3843.           For j = 1 To docCollection.Count
  3844.                Set docLocal = docCollection.getnthdocument(j)               
  3845.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  3846.                     Select Case docLocal.ForwardOptions(0)
  3847.                     Case "1" : 'user wants to forward the URL only
  3848.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  3849.                     Case "2" : 'user wants to send entire page
  3850.                          Call  ViewForward(docLocal)
  3851.                     End Select
  3852.           'remove any remaining fields that don't need to be carried around
  3853.                     docLocal.RemoveItem "ForwardOptions" 
  3854.                     docLocal.save True, False
  3855.                     
  3856.                End If
  3857.                Exit Sub
  3858.           Next
  3859.      End If
  3860.      Exit Sub
  3861. End Sub
  3862. '++LotusScript Development Environment:2:5:(Options):0:74
  3863. Option Public
  3864. Use "InternetFunctions"
  3865. '++LotusScript Development Environment:2:5:(Forward):0:1
  3866. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3867. '++LotusScript Development Environment:2:5:(Options):0:66
  3868. '++LotusScript Development Environment:2:5:(Forward):0:1
  3869. Declare Sub Postopen(Source As Notesuiview)
  3870. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  3871. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3872. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3873. Private Sub BindEvents(Byval Objectname_ As String)
  3874.      Static Source As NOTESUIVIEW
  3875.      Set Source = Bind(Objectname_)
  3876.      On Event Postopen From Source Call Postopen
  3877.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  3878. End Sub
  3879. '++LotusScript Development Environment:2:2:Postopen:1:12
  3880. Sub Postopen(Source As Notesuiview)
  3881.      InstantiateObjects
  3882. End Sub
  3883. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  3884. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  3885.  '    Call MoveToFolder(source,target,continue)
  3886. End Sub
  3887. O=Lotus Notes
  3888. O=Lotus Notes
  3889. PURSAFO
  3890. |.:#U
  3891. O=Lotus Notes
  3892. CN=Lotus Notes Template Development/O=Lotus Notes
  3893. PURSAFO
  3894. Fde!f^^
  3895. $SCRIPTOBJ_20
  3896. $SCRIPTOBJ_19
  3897. $TITLE
  3898. $Index
  3899. $Formula
  3900. $FormulaClass
  3901. $VIEWFORMAT
  3902. $FormFormula
  3903. $Comment
  3904. $ACTIONS
  3905. $SCRIPTOBJ_2
  3906. $SCRIPTOBJ_3
  3907. $SCRIPTOBJ_6
  3908. $SCRIPTOBJ_7
  3909. $SCRIPTOBJ_9
  3910. $SCRIPTOBJ_16
  3911. $SCRIPTOBJ_17
  3912. $SCRIPTOBJ_18
  3913. $ViewGlobalScript
  3914. $ViewGlobalScript_O
  3915. $ViewScript
  3916. $ViewScript_O
  3917. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  3918. '++LotusScript Development Environment:2:5:(Forward):0:1
  3919. Declare Sub Click(Source As Button)
  3920. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3921. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3922. Private Sub BindEvents(Byval Objectname_ As String)
  3923.      Static Source As BUTTON
  3924.      Set Source = Bind(Objectname_)
  3925.      On Event Click From Source Call Click
  3926. End Sub
  3927. '++LotusScript Development Environment:2:2:Click:1:12
  3928. Sub Click(Source As Button)
  3929.      Browse
  3930. End Sub
  3931. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  3932. '++LotusScript Development Environment:2:5:(Forward):0:1
  3933. Declare Sub Click(Source As Button)
  3934. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3935. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3936. Private Sub BindEvents(Byval Objectname_ As String)
  3937.      Static Source As BUTTON
  3938.      Set Source = Bind(Objectname_)
  3939.      On Event Click From Source Call Click
  3940. End Sub
  3941. '++LotusScript Development Environment:2:2:Click:1:12
  3942. Sub Click(Source As Button)
  3943.      ViewDelete
  3944. End Sub
  3945. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  3946. '++LotusScript Development Environment:2:5:(Forward):0:1
  3947. Declare Sub Click(Source As Button)
  3948. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3949. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3950. Private Sub BindEvents(Byval Objectname_ As String)
  3951.      Static Source As BUTTON
  3952.      Set Source = Bind(Objectname_)
  3953.      On Event Click From Source Call Click
  3954. End Sub
  3955. '++LotusScript Development Environment:2:2:Click:1:12
  3956. Sub Click(Source As Button)
  3957.      PrintWebDocument
  3958. End Sub
  3959. _Forward
  3960. Sh_are...
  3961. '++LotusScript Development Environment:2:5:(Options):0:66
  3962. '++LotusScript Development Environment:2:5:(Forward):0:1
  3963. Declare Sub Click(Source As Button)
  3964. Declare Function GetInternetProfile
  3965. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3966. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3967. Private Sub BindEvents(Byval Objectname_ As String)
  3968.      Static Source As BUTTON
  3969.      Set Source = Bind(Objectname_)
  3970.      On Event Click From Source Call Click
  3971. End Sub
  3972. '++LotusScript Development Environment:2:2:Click:1:12
  3973. Sub Click(Source As Button)
  3974.      
  3975.      Dim docLocal As NotesDocument
  3976.      Dim webdoc As notesdocument
  3977.      Dim docCollection As NotesDocumentCollection   
  3978.      
  3979.      Set docCollection = db.UnprocessedDocuments
  3980.      If (docCollection.Count = 0) Then
  3981.           Msgbox "You must select a document.",16,"Error"
  3982.           Exit Sub
  3983.      End If
  3984.      Set docLocal = docCollection.GetFirstDocument
  3985.      If docLocal.hasitem("URL") Then 
  3986.           docLocal.tmpWebServer  = docProfile.WebServer
  3987.           docLocal.tmpWebDb = docProfile.WebDatabase
  3988.           docLocal.Save True, True
  3989.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  3990.                docLocal.Save True, True
  3991.                Select Case docLocal.SharedOptions(0)
  3992.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  3993.                Case "2" : 'user wants to copy this to the shared web database
  3994.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3995.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  3996.                     Else
  3997.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  3998.                     End If
  3999.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  4000.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4001.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.locationname
  4002.                     Else
  4003.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  4004.                     End If
  4005.                End Select
  4006.           'remove any remaining fields that don't need to be carried around
  4007.                docLocal.removeItem "ForwardTo"
  4008.                docLocal.RemoveItem "SharedOptions" 
  4009.                docLocal.RemoveItem "Rating"
  4010.                docLocal.removeItem "Content"
  4011.                docLocal.removeItem "Comments"
  4012.           End If     
  4013.           docLocal.RemoveItem "tmpWebServer"
  4014.           docLocal.RemoveItem "tmpWebDb"
  4015.           docLocal.Save True, True
  4016.      Else
  4017.           Msgbox "This document does not contain a URL."
  4018.      End If
  4019. End Sub
  4020. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  4021. Function GetInternetProfile
  4022.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  4023.      Set view = db.getView("(Internet Profile)")
  4024.      Set GetInternetProfile = view.GetFirstDocument
  4025. End Function
  4026. Internet Profiles
  4027. Internet Options
  4028. WebServer
  4029.     0S0E
  4030. Categori_zeK
  4031. _Edit Document
  4032. Send Docu_ment    
  4033. _Move to Folder...
  4034. Move Page to Folder... 
  4035.     0S0E
  4036. _Remove from Folder...
  4037. Import Microsoft Favorites...
  4038. '++LotusScript Development Environment:2:5:(Options):0:66
  4039. '++LotusScript Development Environment:2:5:(Forward):0:1
  4040. Declare Sub Click(Source As Button)
  4041. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4042. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4043. Private Sub BindEvents(Byval Objectname_ As String)
  4044.      Static Source As BUTTON
  4045.      Set Source = Bind(Objectname_)
  4046.      On Event Click From Source Call Click
  4047. End Sub
  4048. '++LotusScript Development Environment:2:2:Click:1:12
  4049. Sub Click(Source As Button)
  4050.      
  4051.      ImportFavorites
  4052. End Sub
  4053. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  4054. '++LotusScript Development Environment:2:5:(Forward):0:1
  4055. Declare Sub Click(Source As Button)
  4056. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4057. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4058. Private Sub BindEvents(Byval Objectname_ As String)
  4059.      Static Source As BUTTON
  4060.      Set Source = Bind(Objectname_)
  4061.      On Event Click From Source Call Click
  4062. End Sub
  4063. '++LotusScript Development Environment:2:2:Click:1:12
  4064. Sub Click(Source As Button)
  4065.      
  4066.      ImportBookmarks
  4067. End Sub
  4068. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  4069. '++LotusScript Development Environment:2:5:(Forward):0:1
  4070. Declare Sub Click(Source As Button)
  4071. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4072. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4073. Private Sub BindEvents(Byval Objectname_ As String)
  4074.      Static Source As BUTTON
  4075.      Set Source = Bind(Objectname_)
  4076.      On Event Click From Source Call Click
  4077. End Sub
  4078. '++LotusScript Development Environment:2:2:Click:1:12
  4079. Sub Click(Source As Button)
  4080.      
  4081.      Dim docLocal As NotesDocument
  4082.      Dim docCollection As NotesDocumentCollection     
  4083.      Set docCollection = db.UnprocessedDocuments
  4084.      If (docCollection.Count = 0) Then
  4085.           Msgbox "You must select a document.",16,"Error"
  4086.           Exit Sub
  4087.      Else
  4088.           For j = 1 To docCollection.Count
  4089.                Set docLocal = docCollection.getnthdocument(j)               
  4090.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4091.                     Select Case docLocal.ForwardOptions(0)
  4092.                     Case "1" : 'user wants to forward the URL only
  4093.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4094.                     Case "2" : 'user wants to send entire page
  4095.                          Call  ViewForward(docLocal)
  4096.                     End Select
  4097.           'remove any remaining fields that don't need to be carried around
  4098.                     docLocal.RemoveItem "ForwardOptions" 
  4099.                     docLocal.save True, False
  4100.                     
  4101.                End If
  4102.                Exit Sub
  4103.           Next
  4104.      End If
  4105.      Exit Sub
  4106. End Sub
  4107. '++LotusScript Development Environment:2:5:(Options):0:74
  4108. Option Public
  4109. Use "InternetFunctions"
  4110. '++LotusScript Development Environment:2:5:(Forward):0:1
  4111. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4112. '++LotusScript Development Environment:2:5:(Options):0:66
  4113. '++LotusScript Development Environment:2:5:(Forward):0:1
  4114. Declare Sub Postopen(Source As Notesuiview)
  4115. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4116. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4117. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4118. Private Sub BindEvents(Byval Objectname_ As String)
  4119.      Static Source As NOTESUIVIEW
  4120.      Set Source = Bind(Objectname_)
  4121.      On Event Postopen From Source Call Postopen
  4122.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4123. End Sub
  4124. '++LotusScript Development Environment:2:2:Postopen:1:12
  4125. Sub Postopen(Source As Notesuiview)
  4126.      InstantiateObjects
  4127. End Sub
  4128. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4129. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4130.      Call MoveToFolder(source,target,continue)
  4131. End Sub
  4132. O=Lotus Notes
  4133. O=Lotus Notes
  4134. PURSAFO
  4135. |.:#U
  4136. O=Lotus Notes
  4137. CN=Lotus Notes Template Development/O=Lotus Notes
  4138. PURSAFO
  4139. Fde!f^^
  4140. $SCRIPTOBJ_14
  4141. $TITLE
  4142. $Name
  4143. $Index
  4144. $Formula
  4145. $FormulaClass
  4146. $VIEWFORMAT
  4147. $FormFormula
  4148. $Comment
  4149. $ACTIONS
  4150. $SCRIPTOBJ_0
  4151. $SCRIPTOBJ_1
  4152. $SCRIPTOBJ_2
  4153. $SCRIPTOBJ_4
  4154. $SCRIPTOBJ_11
  4155. $SCRIPTOBJ_12
  4156. $SCRIPTOBJ_13
  4157. $ViewGlobalScript
  4158. $ViewGlobalScript_O
  4159. $ViewScript
  4160. $ViewScript_O
  4161. >%!-eWv
  4162. Web Bots\Web AheadWeb Bots\Web Ahead
  4163. Bookmark
  4164. HelpForm
  4165. PageMinderStatus
  4166. PageMinderStatus
  4167. PageMinderStatus
  4168. PageMinderStatus
  4169. PageMinderStatus
  4170.     6S9S10S
  4171. $39Title$36URL$Conflict
  4172. $39Title
  4173. Title
  4174. Bookmark
  4175. HelpForm
  4176. PageMinderStatus
  4177. PageMinderStatus
  4178. PageMinderStatus
  4179. PageMinderStatus
  4180. PageMinderStatus
  4181.     6S9S10STitlePageTitle$36Date
  4182. URLURL&
  4183. Admin
  4184. Admin
  4185. forward
  4186. HTMLForm
  4187. HelpForm
  4188. HelpForm
  4189. WebBrowserForm
  4190.     12S13S23S24S25S3FY
  4191. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  4192. HelpFormUsing the Page Minder Feature
  4193. CN=Teresa Deane/O=Iris#########################
  4194. >%!-eWv
  4195. HelpFormUsing the Web Ahead Feature
  4196. CN=Teresa Deane/O=Iris###########################
  4197. http://www.lotus.com/Lotus Development Corporation1
  4198. CN=Teresa Deane/O=Iris
  4199. #######################################################
  4200. IBM Home Page1http://www.ibm.com/
  4201. CN=Teresa Deane/O=Iris
  4202. 1Notes Nethttp://www.notes.net/
  4203. CN=Teresa Deane/O=Iris
  4204. ###########
  4205. InternetFunctionss34Q1
  4206. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#############################
  4207. Internet Options...303
  4208. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#####################################################
  4209. Page Minder
  4210. 1SfL3
  4211. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  4212. ##########################################################
  4213. ##########################################################
  4214. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  4215. '++LotusScript Development Environment:2:5:(Forward):0:1
  4216. Declare Sub Click(Source As Button)
  4217. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4218. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4219. Private Sub BindEvents(Byval Objectname_ As String)
  4220.      Static Source As BUTTON
  4221.      Set Source = Bind(Objectname_)
  4222.      On Event Click From Source Call Click
  4223. End Sub
  4224. '++LotusScript Development Environment:2:2:Click:1:12
  4225. Sub Click(Source As Button)
  4226.      
  4227.      Browse
  4228. End Sub
  4229. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  4230. '++LotusScript Development Environment:2:5:(Forward):0:1
  4231. Declare Sub Click(Source As Button)
  4232. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4233. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4234. Private Sub BindEvents(Byval Objectname_ As String)
  4235.      Static Source As BUTTON
  4236.      Set Source = Bind(Objectname_)
  4237.      On Event Click From Source Call Click
  4238. End Sub
  4239. '++LotusScript Development Environment:2:2:Click:1:12
  4240. Sub Click(Source As Button)
  4241.      
  4242.      ViewDelete     
  4243. End Sub
  4244. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  4245. '++LotusScript Development Environment:2:5:(Forward):0:1
  4246. Declare Sub Click(Source As Button)
  4247. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4248. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4249. Private Sub BindEvents(Byval Objectname_ As String)
  4250.      Static Source As BUTTON
  4251.      Set Source = Bind(Objectname_)
  4252.      On Event Click From Source Call Click
  4253. End Sub
  4254. '++LotusScript Development Environment:2:2:Click:1:12
  4255. Sub Click(Source As Button)
  4256.      
  4257.      PrintWebDocument
  4258. End Sub
  4259. _Forward
  4260. Sh_are...
  4261. '++LotusScript Development Environment:2:5:(Options):0:66
  4262. '++LotusScript Development Environment:2:5:(Forward):0:1
  4263. Declare Sub Click(Source As Button)
  4264. Declare Function GetInternetProfile
  4265. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4266. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4267. Private Sub BindEvents(Byval Objectname_ As String)
  4268.      Static Source As BUTTON
  4269.      Set Source = Bind(Objectname_)
  4270.      On Event Click From Source Call Click
  4271. End Sub
  4272. '++LotusScript Development Environment:2:2:Click:1:12
  4273. Sub Click(Source As Button)
  4274.      
  4275.      Dim docLocal As NotesDocument
  4276.      Dim webdoc As notesdocument
  4277.      Dim docCollection As NotesDocumentCollection     
  4278.      Set docCollection = db.UnprocessedDocuments
  4279.      If (docCollection.Count = 0) Then
  4280.           Msgbox "You must select a document.",16,"Error"
  4281.           Exit Sub
  4282.      End If
  4283.      Set docLocal = docCollection.GetFirstDocument
  4284.      If docLocal.hasitem("URL") Then
  4285.           docLocal.tmpWebServer  = docProfile.WebServer
  4286.           docLocal.tmpWebDb = docProfile.WebDatabase
  4287.           docLocal.Save True, True
  4288.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  4289.                docLocal.Save True, True
  4290.                Select Case docLocal.SharedOptions(0)
  4291.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  4292.                Case "2" : 'user wants to copy this to the shared web database
  4293.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4294.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  4295.                     Else
  4296.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  4297.                     End If
  4298.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  4299.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4300.                          CreateRatingDocument docLocal, browserobject.locationurl,browserobject.locationname
  4301.                     Else
  4302.                          CreateRatingDocument docLocal,docLocal.url(0),docLocal.title(0)
  4303.                     End If
  4304.                End Select
  4305.           'remove any remaining fields that don't need to be carried around
  4306.                docLocal.removeItem "ForwardTo"
  4307.                docLocal.RemoveItem "SharedOptions" 
  4308.                docLocal.RemoveItem "Rating"
  4309.                docLocal.removeItem "Content"
  4310.                docLocal.removeItem "Comments"
  4311.           End If     
  4312.           docLocal.RemoveItem "tmpWebServer"
  4313.           docLocal.RemoveItem "tmpWebDb"
  4314.           docLocal.Save True, True
  4315.      Else
  4316.           Msgbox "This document does not contain a URL."
  4317.      End If
  4318. End Sub
  4319. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  4320. Function GetInternetProfile
  4321.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  4322.      Set view = db.getView("(Internet Profile)")
  4323.      Set GetInternetProfile = view.GetFirstDocument
  4324. End Function
  4325. Internet Profiles
  4326. Internet Options
  4327. WebServer
  4328.     0S0E
  4329. Categori_zeK
  4330. _Edit Document
  4331. Send Docu_ment    
  4332. _Move to Folder...
  4333. Move Page to Folder... 
  4334.     0S0E
  4335. _Remove from Folder...
  4336. Import Microsoft Favorites...
  4337. '++LotusScript Development Environment:2:5:(Options):0:66
  4338. '++LotusScript Development Environment:2:5:(Forward):0:1
  4339. Declare Sub Click(Source As Button)
  4340. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4341. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4342. Private Sub BindEvents(Byval Objectname_ As String)
  4343.      Static Source As BUTTON
  4344.      Set Source = Bind(Objectname_)
  4345.      On Event Click From Source Call Click
  4346. End Sub
  4347. '++LotusScript Development Environment:2:2:Click:1:12
  4348. Sub Click(Source As Button)
  4349.      
  4350.      ImportFavorites
  4351. End Sub
  4352. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  4353. '++LotusScript Development Environment:2:5:(Forward):0:1
  4354. Declare Sub Click(Source As Button)
  4355. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4356. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4357. Private Sub BindEvents(Byval Objectname_ As String)
  4358.      Static Source As BUTTON
  4359.      Set Source = Bind(Objectname_)
  4360.      On Event Click From Source Call Click
  4361. End Sub
  4362. '++LotusScript Development Environment:2:2:Click:1:12
  4363. Sub Click(Source As Button)
  4364.      ImportBookmarks
  4365.      
  4366. End Sub
  4367. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  4368. '++LotusScript Development Environment:2:5:(Forward):0:1
  4369. Declare Sub Click(Source As Button)
  4370. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4371. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4372. Private Sub BindEvents(Byval Objectname_ As String)
  4373.      Static Source As BUTTON
  4374.      Set Source = Bind(Objectname_)
  4375.      On Event Click From Source Call Click
  4376. End Sub
  4377. '++LotusScript Development Environment:2:2:Click:1:12
  4378. Sub Click(Source As Button)
  4379.      
  4380.      Dim docLocal As NotesDocument
  4381.      Dim docCollection As NotesDocumentCollection     
  4382.      Set docCollection = db.UnprocessedDocuments
  4383.      If (docCollection.Count = 0) Then
  4384.           Msgbox "You must select a document.",16,"Error"
  4385.           Exit Sub
  4386.      Else
  4387.           For j = 1 To docCollection.Count
  4388.                Set docLocal = docCollection.getnthdocument(j)               
  4389.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4390.                     Select Case docLocal.ForwardOptions(0)
  4391.                     Case "1" : 'user wants to forward the URL only
  4392.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4393.                     Case "2" : 'user wants to send entire page
  4394.                          Call  ViewForward(docLocal)
  4395.                     End Select
  4396.           'remove any remaining fields that don't need to be carried around
  4397.                     docLocal.RemoveItem "ForwardOptions" 
  4398.                     docLocal.save True, False
  4399.                     
  4400.                End If
  4401.                Exit Sub
  4402.           Next
  4403.      End If
  4404.      Exit Sub
  4405. End Sub
  4406. '++LotusScript Development Environment:2:5:(Options):0:74
  4407. Option Public
  4408. Use "InternetFunctions"
  4409. '++LotusScript Development Environment:2:5:(Forward):0:1
  4410. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4411. '++LotusScript Development Environment:2:5:(Options):0:66
  4412. '++LotusScript Development Environment:2:5:(Forward):0:1
  4413. Declare Sub Postopen(Source As Notesuiview)
  4414. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4415. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4416. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4417. Private Sub BindEvents(Byval Objectname_ As String)
  4418.      Static Source As NOTESUIVIEW
  4419.      Set Source = Bind(Objectname_)
  4420.      On Event Postopen From Source Call Postopen
  4421.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4422. End Sub
  4423. '++LotusScript Development Environment:2:2:Postopen:1:12
  4424. Sub Postopen(Source As Notesuiview)
  4425.      InstantiateObjects
  4426. End Sub
  4427. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4428. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4429.      Call MoveToFolder(source,target,continue)
  4430. End Sub
  4431. O=Lotus Notes
  4432. O=Lotus Notes
  4433. PURSAFO
  4434. |.:#U
  4435. O=Lotus Notes
  4436. CN=Lotus Notes Template Development/O=Lotus Notes
  4437. PURSAFO
  4438. Fde!f^^
  4439. "x]&c
  4440. $SCRIPTOBJ_14
  4441. $TITLE
  4442. $Name
  4443. $Index
  4444. $Formula
  4445. $FormulaClass
  4446. $VIEWFORMAT
  4447. $FormFormula
  4448. $Comment
  4449. $ACTIONS
  4450. $SCRIPTOBJ_0
  4451. $SCRIPTOBJ_1
  4452. $SCRIPTOBJ_2
  4453. $SCRIPTOBJ_4
  4454. $SCRIPTOBJ_11
  4455. $SCRIPTOBJ_12
  4456. $SCRIPTOBJ_13
  4457. $ViewGlobalScript
  4458. $ViewGlobalScript_O
  4459. $ViewScript
  4460. $ViewScript_O
  4461. HelpForm
  4462. Title
  4463. O=Lotus Notes
  4464. O=Lotus Notes
  4465. PURSAFO
  4466. |.:#U
  4467. O=Lotus Notes
  4468. CN=Lotus Notes Template Development/O=Lotus Notes
  4469. PURSAFO
  4470. Fde!f^^
  4471. Kb4ayB
  4472. $TITLE
  4473. $INFO
  4474. $$ScriptName
  4475. $BODY
  4476. '++LotusScript Development Environment:2:5:(Options):0:74
  4477. Option Base 1
  4478. Use "AgentFunctions"
  4479. '++LotusScript Development Environment:2:5:(Forward):0:1
  4480. Declare Sub Initialize
  4481. Declare Sub WormThePage(URLToWorm As Variant)
  4482. Declare Sub ProcessURLField
  4483. Declare Sub RetrievePages(y As Integer)
  4484. Declare Sub CheckPage(urltocheck As String, y As Integer)
  4485. Declare Function OKToRetrieve(checkurl As String, ArraySizeOK As Integer) As Integer
  4486. Declare Function OKToGetPerRobots( url As Variant ) As Integer
  4487. Declare Sub FetchRobotsFile(url As Variant, currentdomain As String)
  4488. '++LotusScript Development Environment:2:5:(Declarations):0:10
  4489. Dim LevelsToWorm As Variant
  4490. Dim WebAheadAuthentication As Variant
  4491. Dim PageToCrawl As notesdocument
  4492. Dim NextPageToCrawl As notesdocument
  4493. Dim URLTextList() As String
  4494. Dim URLListIndex As Integer
  4495. Dim pages_to_worm () As String          'list of pages that links need to be retrieved from
  4496. Dim ptw As Integer  
  4497. Dim next_pages_to_worm () As String    'list of pages to retrieve in the next level pass
  4498. Dim nptw As Integer                              
  4499. Dim pages_retrieved ()As String            'list of pages that have already been retrieved for this session
  4500. Dim pr As Integer                                  
  4501. Dim pages_wormed () As String            'list of pages that have already been processed in this session
  4502. Dim pw As Integer  
  4503. Dim CurrentPageRetrieved As notesdocument
  4504. Dim ArraySizeOK As Integer
  4505. Dim WebAheadAgent As notesagent
  4506. '++LotusScript Development Environment:2:2:Initialize:1:10
  4507. Sub Initialize
  4508.      
  4509.      '*
  4510.      '*  Initialize  Variables and declare local variables
  4511.      '*
  4512.      
  4513.      Dim InterNetProfile As Notesdocument
  4514.      Dim ProfileView As notesview
  4515.      Dim WebAheadFolder As notesview
  4516.      Dim URL As Variant
  4517.      
  4518.      '*
  4519.      '*  Initialize Variables
  4520.      '*
  4521.      ArraySizeOK = True
  4522.      pw=1
  4523.      nptw=1
  4524.      pr=1
  4525.      ptw=1
  4526.      Redim pages_to_worm(ptw)
  4527.      Redim Next_Pages_to_worm(nptw)
  4528.      Redim pages_retrieved(pr)
  4529.      Redim pages_wormed(pw)
  4530.      InstantiateAgentObjects 
  4531.      Set WebDatabase = Session.CurrentDatabase
  4532.      Set WebAheadAgent = Session.currentagent
  4533.      
  4534.       '*
  4535.      '*  Open/Create the Agent Error Log on the client.
  4536.      '*
  4537.      
  4538.      Set AgentLog = OpenLog(WebAheadAgent.name)
  4539.      
  4540.      If LogLocation = "Agent Log" Then agentLog.LogErrors = True
  4541.      
  4542.      Call logaction( "Starting Web Ahead agent.....")
  4543.      
  4544.      
  4545.      '*
  4546.      '*  First check to see if the current location settings are set for local retrievals.
  4547.      '*
  4548.      
  4549.      If WebLocationOK Then
  4550.           
  4551.           If Not ( WebDatabase Is Nothing) Then
  4552.                Set datadoc = Session.SavedData
  4553.                
  4554.                If (DataDoc Is Nothing) Then
  4555.                     Set DataDoc = New Notesdocument (WebDatabase) 
  4556.                End If
  4557.           Else
  4558.                Call  logerror(1, "Unable to open Web Database.")
  4559.                Goto cleanup
  4560.           End If
  4561.           
  4562.           If View Is Nothing Then
  4563.                Call logerror(4, "Profile View does not exist.  Please replace the design of " +WebDatabase.Title+" with Personal Web Navigator 4.6 template.")
  4564.                Goto cleanup
  4565.           End If
  4566.           
  4567.           
  4568.           If docProfile Is Nothing Then
  4569.                Call logerror(4, "No profile document, please select Actions - Internet Options and save the document. ")
  4570.                Goto cleanup
  4571.           End If
  4572.           
  4573.      '*
  4574.      '*  Retrieving pertinent values from the
  4575.      '*  Internet Profile.
  4576.      '*
  4577.           
  4578.           LevelsToWorm = docProfile.ScanAhead
  4579.           If LevelsToWorm(0) = "" Then
  4580.                'Number of levels to Web Ahead not specified, assuming 1.
  4581.                LevelsToWorm(0) = "1"
  4582.           End If
  4583.           
  4584.      '*
  4585.      '*  The following lines instantiate the WebAhead folder and 
  4586.      '*  perform the worming of the pages.
  4587.      '*
  4588.           
  4589.           Set WebAheadFolder = WebDatabase.GetView("Web Bots\Web Ahead")
  4590.           
  4591.           If (WebAheadFolder Is Nothing) Then
  4592.                Call logerror(2, "Could not find Web Ahead Folder.  Please replace the design of " +WebDatabase.Title+" with Personal Web Navigator 4.5 and rerun the Web Ahead agent.")
  4593.                Goto cleanup
  4594.           End If
  4595.           
  4596.           Set PageToCrawl = WebAheadFolder.GetfirstDocument
  4597.           
  4598.           If (PageToCrawl Is Nothing) Then
  4599.                logaction( "No documents were found to retrieve links from.  Web Ahead Agent successfully finished.")
  4600.                Goto cleanup
  4601.           Else
  4602.                
  4603.           '*
  4604.           '*  The while loop retrieves all links off  the pages in the Web Ahead folder for every level specified.
  4605.           '*
  4606.                
  4607.                While Not (PageToCrawl Is Nothing)
  4608.                     If PageToCrawl.form(0) = "HelpForm"  Goto Nextdocument
  4609.                     If PageToCrawl.hasitem("URL") Then
  4610.                          URL = PageToCrawl.URL
  4611.                          Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "1")          
  4612.                          Call PageToCrawl.Save(True, False)
  4613.                          WormThePage(URL(0))
  4614.                     Else
  4615.                          Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "2") 
  4616.                          Call PageToCrawl.Save(True, False)
  4617.                          Goto NextDocument
  4618.                     End If
  4619. NextDocument:
  4620.                     If PageToCrawl.WebAheadStatus(0) <> "2" Then
  4621.                          Set NextPageToCrawl = WebAheadFolder.Getnextdocument(PageToCrawl)
  4622.                          Call PageToCrawl.Removefromfolder("Web Bots\Web Ahead")
  4623.                          Set PageToCrawl = NextPageToCrawl
  4624.                     Else
  4625.                          Set PageToCrawl = WebAheadFolder.Getnextdocument(PageToCrawl)
  4626.                     End If
  4627.                Wend
  4628.                
  4629.           End If
  4630.      End If
  4631. Cleanup:
  4632.      logaction( "Web Ahead agent ending.")
  4633. End Sub
  4634. '++LotusScript Development Environment:2:2:WormThePage:1:8
  4635. Sub WormThePage(URLToWorm As Variant)
  4636.      
  4637.      '*
  4638.      '*  This routine retrieves all links on the current page for the number of levels
  4639.      '*  specified in the internet options form.
  4640.      '*
  4641.      
  4642.      Pages_To_Worm(1) = URLToWorm
  4643.      
  4644.      '*  
  4645.      '* Check to see if there is a page to retrieve links from in the array pages_to_worm
  4646.      '*
  4647.      
  4648.      For y = 1 To Cint(LevelsToWorm(0))
  4649.           If ( DebugFlag = "1" ) Then logaction( "Retrieving level " + Cstr(y))
  4650.           If pages_to_worm(1) <> "" Then
  4651.                Forall J  In pages_to_worm
  4652.                     
  4653.                     If ( DebugFlag = "1" ) Then logaction( "About to retrieve links on  " + j  )     
  4654.                     
  4655.                     '*
  4656.                     '* Before we retrieve it, make sure that it hasn't already been retrieved for this session
  4657.                     '*
  4658.                     
  4659.                     If OKToRetrieve(j, ArraySizeOK) Then
  4660.                          
  4661.                          '*
  4662.                          '*  Make sure it's okay to retrieve pages from the site per the sites robots.txt
  4663.                          '*
  4664.                          
  4665.                          If OKToGetPerRobots(j) Then
  4666.                               Set CurrentPageRetrieved = RetrieveOverInternet(j,PageToCrawl,1)
  4667.                          Else
  4668.                               If ( DebugFlag = "1" ) Then  Call logerror(10, "Not okay to retrieve links off the site per robots.txt")
  4669.                               If ( DebugFlag = "1" ) Then Call logerror(10, "Could not retrieve links off the page"+j+".")
  4670.                               Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "2") 
  4671.                               Call PageToCrawl.Save(True,False)
  4672.                               Exit Sub
  4673.                          End If
  4674.                          
  4675.                     Else
  4676.                          Set CurrentPageRetrieved = WebDatabase.Getdocumentbyurl(j,0,0)
  4677.                          
  4678.                          '*
  4679.                          '*  Make sure that the page which is already in the database is not an error page.
  4680.                          '*
  4681.                          
  4682.                          If (CurrentPageRetrieved.HTTPStatus(0) = "200") Or (CurrentPageRetrieved.HTTPStatus(0) = "304" ) Then
  4683.                               Goto already_retrieved
  4684.                          Else
  4685.                               Set CurrentPageRetrieved = RetrieveOverInternet(j, CurrentPageRetrieved,1)
  4686.                          End If
  4687.                     End If
  4688.                     
  4689.                     
  4690.                     
  4691.                     If (CurrentPageRetrieved.HTTPStatus(0) = "200") Or (CurrentPageRetrieved.HTTPStatus(0) = "304") Then
  4692.                          If ( DebugFlag = "1" ) Then Call logerror(10, "Successfully retrieved " + j)
  4693.                          
  4694.                               '*
  4695.                               '* Add the page to the page retrieval array         
  4696.                               '*
  4697.                          If pr < 10000 Then
  4698.                               pages_retrieved ( pr) = j
  4699.                               pr=pr+1
  4700.                               Redim Preserve pages_retrieved(pr)
  4701.                          Else
  4702.                               ArraySizeOK = False
  4703.                          End If
  4704.                          
  4705.                              '* 
  4706.                              '* Make sure that the returned document has a URLLinks# field
  4707.                              '* since that is where all of the URLs on the page are stored.
  4708.                              '*
  4709.                          
  4710. already_retrieved:
  4711.                          
  4712.                          If CurrentPageRetrieved.hasitem("URLLinks1") Then
  4713.                               
  4714.                                '*
  4715.                                '*  Process the URLLinks# fields into one concise, singular text list of URL's
  4716.                                '*
  4717.                               
  4718.                               ProcessURLField
  4719.                               
  4720.                                '*
  4721.                                '*  Go ahead and retrieve the pages in the URLTextList
  4722.                                '*
  4723.                               
  4724.                               RetrievePages(y)     
  4725.                               If ( DebugFlag = "1" ) Then logaction "Retrieved "+Cstr(URLListIndex) + " from the site "+Cstr(urltoworm)+"."
  4726.                               If ( DebugFlag = "1" ) Then logaction( "Just retrieved all links off of "+PageToCrawl.getitemvalue("URL")(0))
  4727.                          Else
  4728.                               If ( DebugFlag = "1" ) Then logaction( "No links to retrieve on " + PageToCrawl.getitemvalue("URL")(0))
  4729.                          End If            
  4730.                          
  4731.                               '*
  4732.                               '*  Now that the links have been retrieved, add the page to the list of pages that have already been processed.
  4733.                               '*  
  4734.                          
  4735.                          pages_wormed(pw) =CurrentPageRetrieved.getitemvalue("URL")(0)
  4736.                          pw=pw+1
  4737.                          Redim Preserve pages_wormed(pw)
  4738.                          
  4739.                     Else
  4740.                          If ( DebugFlag = "1" ) Then Call logerror(9, "Error page returned for " + j)
  4741.                          If ( DebugFlag = "1" ) Then Call logerror(9, "Could not retrieve links off the page"+j+".")
  4742.                     End If
  4743.                     
  4744.                     
  4745.                End Forall     
  4746.                If ( DebugFlag = "1" ) Then logaction "Finished retrieving links for level "+Cstr(y)
  4747.                
  4748.                
  4749.                '*
  4750.                '*  Now move to the next level of pages to retrieve links from in the pages_to_worm array
  4751.                '*  Reset the pages to worm array to clear out the previous pages to worm
  4752.                '*  Note:  we only need to do this is we are retrieving links for more than one level.
  4753.                '*
  4754.                
  4755.                If LevelsToWorm(0) <> "1" Then 
  4756.                     If nptw = 1 Then Goto Done
  4757.                     Redim pages_to_worm(nptw-1) As String
  4758.                     For z = 1 To (nptw-1)
  4759.                          pages_to_worm(z) = next_pages_to_worm(z)
  4760.                     Next Z
  4761.                     ptw = nptw
  4762.                     
  4763.                     '*
  4764.                     '*  Reinitialize the next pages to worm array
  4765.                     '*
  4766.                     nptw=1
  4767.                     Redim next_pages_to_worm(nptw) As String
  4768.                Else
  4769.                '*
  4770.                '* We are done.  There are no more pages to retrieve off the page.  The page needs to be removed from the folder.
  4771.                '*
  4772. done: 
  4773.                     
  4774.                     Exit For
  4775.                End If
  4776.           End If
  4777.           If ( DebugFlag = "1" ) Then logaction( "Finished retrieving " + LevelsToWorm(0) +" for the page" +Cstr(URLToWorm)+". ")
  4778.           If ( DebugFlag = "1" ) Then logaction( "Retrieved " + Cstr(pw)+"pages.")
  4779.           
  4780.      Next Y
  4781. End Sub
  4782. '++LotusScript Development Environment:2:2:ProcessURLField:1:8
  4783. Sub ProcessURLField
  4784.      
  4785.      '*
  4786.      '*  The purpose of this subroutine is to process all of the URLLinks#
  4787.      '*  fields into one concise, non-duplicated list of URL's that only
  4788.      '*  refer to http pages.  The result is the global array URLTextList.
  4789.      '*
  4790.      
  4791.      Dim URLField As String            'the current URLLinks# field
  4792.      Dim URLNum As Integer
  4793.      Dim URLFieldNum As Integer
  4794.      Dim RawURLList As Variant
  4795.      Dim DuplicatedURLList() As String
  4796.      
  4797.      
  4798.      URLNum =1
  4799.      URLField = "URLLinks1"
  4800.      URLFieldNum = 1
  4801.      
  4802.      '*
  4803.      '*  Put all the URL's in one text array -- URLTextList
  4804.      '*
  4805.      While CurrentPageRetrieved.HasItem(URLField)
  4806.           
  4807.           RawURLList = CurrentPageRetrieved.GetItemValue(URLField)
  4808.           Redim DuplicatedURLList (Ubound(RawURLList)+1)
  4809.           Forall j In RawURLList     
  4810.                
  4811.                '*
  4812.                '*   While we are putting all of the urls into one text array we will remove 
  4813.                '*  any urls other than those that use the http protocol.
  4814.                '*
  4815.                
  4816.                If Instr(1, j, "http",1) <> 0 Then
  4817.                     DuplicatedURLList(URLNum) = j
  4818.                     URLNum = URLNum + 1
  4819.                End If
  4820.           End Forall
  4821.           
  4822.           URLFieldNum = URLFieldNum + 1
  4823.           Mid$(URLField, 5) = Cstr(URLFieldNum)
  4824.      Wend
  4825.      
  4826.      Redim Preserve DuplicatedURLList(URLNum)
  4827.      
  4828.      '*
  4829.      '*  Now all URL's to fetch are in the DuplicatedURLList array
  4830.      '*  Now duplicates need to be removed from the array to save time
  4831.      '*
  4832.      
  4833.      Redim URLTextList(URLNum) As String
  4834.      
  4835.      URLListIndex = 1
  4836.      URLTextList(1) = DuplicatedURLList(1)
  4837.      If URLNum <>1 Then
  4838.           For y = 2 To (URLNum -1)
  4839.                URLListIndex = URLListIndex + 1              
  4840.                URLTextList(URLListIndex) = DuplicatedURLList(y)
  4841.                
  4842.                For x = 1 To (URLListIndex-1) 
  4843.                     If URLTextList(x) = DuplicatedURLList(y) Then
  4844.                          URLListIndex = URLListIndex - 1
  4845.                     End If
  4846.                Next  X             
  4847.           Next Y
  4848.      Else
  4849.           URLListIndex = URLListIndex + 1
  4850.      End If
  4851.      Redim Preserve URLTextList(URLListIndex)
  4852. End Sub
  4853. '++LotusScript Development Environment:2:2:RetrievePages:1:8
  4854. Sub RetrievePages(y As Integer)
  4855.      
  4856.      '*
  4857.      '*  This routine retrieves all of the pages in the URLTextList array.
  4858.      '*
  4859.      
  4860.      Forall j In URLTextList
  4861.           CheckPage j, y
  4862.      End Forall
  4863. End Sub
  4864. '++LotusScript Development Environment:2:2:CheckPage:1:8
  4865. Sub CheckPage(urltocheck As String, y As Integer)
  4866.      
  4867.      '*
  4868.      '*  This subroutine checks the page we are about to retrieve.
  4869.      '*  It first makes sure we have not already retrieved the page in this session.
  4870.      '*  Next it makes sure that the page retrieved is valid per the status code returned.
  4871.      '*
  4872.      
  4873.      Dim webdoc As notesdocument    
  4874.      Dim dummydoc As notesdocument
  4875.      
  4876.      '*
  4877.      '*  Check to make sure we have not already retrieved the page                              
  4878.      '*
  4879.      
  4880.      
  4881.      If OKToRetrieve(urltocheck,ArraySizeOK) Then 
  4882.           If OKToGetPerRobots(urltocheck) Then
  4883.                If Cint(LevelsToWorm(0)) - y  <> 0 Then
  4884.                     Set WebDoc = RetrieveOverInternet(urltocheck,dummydoc,1)
  4885.                Else
  4886.                     Set WebDoc = RetrieveOverInternet(urltocheck,dummydoc,0) 
  4887.                End If
  4888.                
  4889.                If (webdoc.HTTPstatus(0) = "200") Or (webdoc.HTTPStatus(0) = "304") Then
  4890.                     
  4891.                          '*
  4892.                          '* Add the page to the page retrieval array         
  4893.                          '*
  4894.                     If pr < 10000 Then
  4895.                          pages_retrieved ( pr) = (urltocheck)
  4896.                          pr=pr+1
  4897.                          Redim Preserve pages_retrieved(pr)
  4898.                     Else
  4899.                          ArraySizeOK = False
  4900.                     End If
  4901.                     
  4902.                     '*
  4903.                     '*  Add the page to the list of pages to be retreived
  4904.                     '*
  4905.                     If Cint(LevelsToWorm(0)) - y  <> 0 Then    
  4906.                          next_pages_to_worm(nptw) = (urltocheck)
  4907.                          nptw = nptw+1
  4908.                          Redim Preserve next_pages_to_worm(nptw)
  4909.                     End If
  4910.                Elseif (webdoc.HTTPStatus(0) = "401") Then
  4911.                     '*  
  4912.                     '*  The page needs to be authenticated, notify the user in the error log
  4913.                     '*
  4914.                     Call logerror(8,  "Web Ahead is unable to retrieve "+urltocheck+" because it requires authentication.")
  4915.                     Call logerror(8, "Retrieve the page manually and move it into the web ahead folder.")
  4916.                     
  4917.                Else
  4918.                     Call logerror(9, "Page " + urltocheck +" returned a bad status code:  "+webdoc.status(0)+".")
  4919.                End If
  4920.           Else
  4921.                Call logerror(10, "Page " + urltocheck + " is forbidden by the robots.txt file on the server.")
  4922.           End If
  4923.      Else
  4924.           next_pages_to_worm(nptw) = (urltocheck)
  4925.           nptw = nptw+1
  4926.           Redim Preserve next_pages_to_worm(nptw)
  4927.      End If
  4928.      
  4929.      
  4930. End Sub
  4931. '++LotusScript Development Environment:2:1:OKToRetrieve:1:8
  4932. Function OKToRetrieve(checkurl As String, ArraySizeOK As Integer) As Integer
  4933.      
  4934.      '*
  4935.      '*  This function goes throught the current list of URLs which have already
  4936.      '*  been retrieved for this session.  If the page has already been retrieved,
  4937.      '*  it sets the function equal to false.
  4938.      '*
  4939.      If ArraySizeOK Then
  4940.           OKToRetrieve = True
  4941.           Forall j In pages_retrieved
  4942.                If checkurl= j Then 
  4943.                     OKToRetrieve = False
  4944.                     Exit Function
  4945.                End If
  4946.           End Forall
  4947.      End If
  4948. End Function
  4949. '++LotusScript Development Environment:2:1:OKToGetPerRobots:1:8
  4950. Function OKToGetPerRobots( url As Variant ) As Integer
  4951.      '*
  4952.      '*  The purpose of this function is to check the host robots.txt file
  4953.      '*   for the site to make sure that it is okay to retrieve pages from the site.
  4954.      '*   It returns true if the page has not been excluded from robots.txt.
  4955.      '*
  4956.      
  4957.      Dim Currentdomain As String
  4958.      
  4959.      CurrentDomain = (Left(url, (Instr(8, url, "/", 1))))
  4960.      
  4961.      
  4962.      OKToGetPerRobots = True
  4963.      
  4964.      '*
  4965.      '* Check the complete list of "Disallow:" paths to see whether we match any of them
  4966.      '*
  4967.      
  4968.      If datadoc.HasItem( currentdomain ) Then
  4969.           exclist = datadoc.GetItemValue( currentdomain )
  4970.           If exclist(0) = "None" Then
  4971.                OKToGetPerRobots = True
  4972.                Exit Function
  4973.           End If
  4974.      Else
  4975.           Call   FetchRobotsFile(url, currentdomain)
  4976.           exclist = datadoc.GetItemValue( currentdomain )
  4977.           If exclist(0) = "None" Then
  4978.                OKToGetPerRobots = True
  4979.                Exit Function
  4980.           End If
  4981.      End If
  4982.      
  4983.           '*
  4984.           '*  Check whether any in that list match the path we want
  4985.           '*
  4986.      
  4987.      
  4988.      Forall testpath In exclist
  4989.           
  4990.                '*
  4991.                '*  Note:  testpath always begins with a forward-slash.  Wildcards have been removed at this stage,
  4992.                '* so "/" means disallow all paths;  "/tmp" means "/tmp*".  Testpath is also always stored in lowercase.
  4993.                '*
  4994.           
  4995.           Dim l As Integer
  4996.           l  = Len( testpath )
  4997.           If l > 0 Then
  4998.                If Left$( path, l )=testpath Then
  4999.                     
  5000.                          '*
  5001.                          '* Hit an exclusion!  
  5002.                          '*
  5003.                     
  5004.                     OKToGetPerRobots = False
  5005.                     Exit Function
  5006.                End If
  5007.           End If
  5008.      End Forall
  5009.      
  5010. End Function
  5011. '++LotusScript Development Environment:2:2:FetchRobotsFile:1:8
  5012. Sub FetchRobotsFile(url As Variant, currentdomain As String)
  5013.      Dim exclusionpage As NotesDocument
  5014.      Dim dummypage As notesdocument
  5015.           '*
  5016.           '*  Retrieve the site's ROBOTS.TXT. 
  5017.           '*
  5018.      
  5019.      Set exclusionpage = RetrieveOverInternet(CurrentDomain+"robots.txt" , dummypage,0)     
  5020.      
  5021.           '*
  5022.           '* If that failed, we have free access to the site.
  5023.           '*
  5024.      
  5025.      If (exclusionpage.HTTPStatus(0) ="200") Or (exclusionpage.HTTPStatus(0) = "304") Then
  5026.           
  5027.                '*
  5028.                '* Got the robots.txt file - we have to parse the file now!
  5029.                '*
  5030.           
  5031.           Dim robtext As String
  5032.           Dim item As Variant
  5033.           Set item = exclusionpage.GetFirstItem("Body")
  5034.           robtext = Lcase$(item.text)
  5035.           
  5036.                '*
  5037.                '* Parse until we get a User-Agent line which matches "*" or "InterNotes" somewhere (or Mozilla)
  5038.                '* Then look thru the "Disallow" lines to see whether they match our URL path
  5039.                '*
  5040.           
  5041.           Dim begin As Integer
  5042.           Dim dbegin As Integer
  5043.           Dim uapos As Integer
  5044.           Dim dapos As Integer
  5045.           Dim danum As Integer
  5046.           Dim t As String
  5047.           Dim  tt As String
  5048.           Dim darray (0 To 50 ) As String
  5049.           begin = 1
  5050.           uapos = 1
  5051.           danum = 0
  5052.           
  5053.           While uapos>0
  5054.                uapos = Instr( begin, robtext, "user-agent:")
  5055.                If uapos>0 Then
  5056.                     uapos=uapos+11  ' skip the "user-agent:" text
  5057.                     t = Ltrim$( Mid$( robtext, uapos ) )
  5058.                     If Left$( t, 1 )="*" Or Left$( t, 7 )="mozilla" Or Left$( t, 5 )="lotus" Then
  5059.                          
  5060.                               '*
  5061.                               '*  This applies to us!!! Better respect the Disallow flags.
  5062.                               '* First, chop any further User-Agent pieces so we know what to use.
  5063.                               '*
  5064.                          
  5065.                          Dim t1 As Integer
  5066.                          t1 = Instr( t, "user-agent:" )
  5067.                          If t1>0 Then
  5068.                               tt = Rtrim$( Left$( t, t1-1 ) )
  5069.                          Else
  5070.                               tt = Rtrim$( t )
  5071.                          End If
  5072.                          
  5073.                               '*
  5074.                               '* Now parse tt for *all*  the Disallow: paths - don't check them just yet
  5075.                               '*
  5076.                          
  5077.                          dbegin = 1
  5078.                          dapos = 1
  5079.                          While dapos>0
  5080.                               dapos = Instr( dbegin, tt, "disallow:" )
  5081.                               If dapos>0 Then
  5082.                                    Dim ban As String
  5083.                                    dapos = dapos+10   ' skip the "disallow:" text
  5084.                                    dendpos = Instr( dapos, tt, "#" )
  5085.                                    If dendpos=0 Then dendpos = Instr( dapos, tt, Chr$(10) )
  5086.                                    If dendpos=0 Then dendpos = Len( tt )-1
  5087.                                    ban = Trim$( Mid$( tt, dapos, dendpos-dapos ) )
  5088.                                    If Len(ban)>0 Then
  5089.                                         If Right$(ban, 1)="/" Then ban =Left$(ban, Len(ban)-1)
  5090.                                         darray( danum ) = ban
  5091.                                         danum = danum+1                                           
  5092.                                    End If                                 
  5093.                               End If
  5094.                               dbegin = dapos
  5095.                          Wend
  5096.                          
  5097.                               '*
  5098.                               '*  Done that user-agent list.  We should keep going, in case there are more!
  5099.                               '*
  5100.                          
  5101.                     End If
  5102.                     
  5103.                          '*
  5104.                          '* Find the next User-Agent which might apply to us
  5105.                          '*
  5106.                     
  5107.                     begin = uapos
  5108.                End If
  5109.           Wend
  5110.           
  5111.                '*
  5112.                '* Store cleaned-up list of Disallow paths in the SavedData document in the field "banthisserver"
  5113.                '*
  5114.           
  5115.           If danum>0 Then
  5116.                Call datadoc.ReplaceItemValue( currentdomain, darray )
  5117.                Call datadoc.Save( True, False )
  5118.           Else
  5119.                Call datadoc.Replaceitemvalue(currentdomain, "None")
  5120.                Call datadoc.Save( True, False )
  5121.           End If
  5122.      Else
  5123.           If ( DebugFlag = "1" ) Then logaction( "Robots.txt page returned an error.  Probably doesn't exist.")
  5124.           Call datadoc.Replaceitemvalue(currentdomain, "None")
  5125.           Call datadoc.Save( True, False )
  5126.      End If
  5127.      
  5128.      
  5129. End Sub
  5130. [$    K|
  5131. O=Lotus Notes
  5132. O=Lotus Notes
  5133. PURSAFO
  5134. |.:#U
  5135. O=Lotus Notes
  5136. CN=Lotus Notes Template Development/O=Lotus Notes
  5137. PURSAFO
  5138. Fde!f^^
  5139. $TITLE
  5140. $AssistType
  5141. $AssistLastRun
  5142. $AssistDocCount
  5143. $AssistFlags
  5144. $AssistTrigger
  5145. $AssistInfo
  5146. $AssistQuery
  5147. $AssistAction
  5148. $AssistAction_Ex
  5149. Using Page Minder: Keeping track of changes to Web pages (Personal Web Navigator)
  5150.     You can run a background agent called Page Minder that closely watches a particular Web page and notifies you when the contents of that page change.
  5151.     Note
  5152.       Page Minder only runs while your Notes workstation is running.
  5153.     Enabling the Page Minder agent
  5154.     To enable the Page Minder agent (you only need to do this once):
  5155.       1.    Choose File - Tools - User Preferences and select "Enable scheduled local agents."
  5156.       2.    Open the Personal Web Navigator database and choose Actions - Internet Options.
  5157.       3.    Click the Enable Page Minder button next to the agent. 
  5158.       4.    In the "Choose Server To Run On" dialog box, choose Local and click OK. (This dialog box only appears if you have not yet enabled the agent in this database.)
  5159.     Running the Page Minder agent
  5160.     To run Page Minder on a Web page:
  5161.       1.    Choose Actions - Internet Options.
  5162.       2.    In the Page Minder agent preferences section, fill out these fields:
  5163.     Search for updates every -- Choose how often you want the agent to check to see if the page contents have changed.  You can choose Hour, 4 Hours, Day, or Week.
  5164.     When updates are found -- Specify how you want to be alerted that the page changed.  Choose "Send me a summary" to send a message notifying you that the page has changed.  Choose "Send me the actual page" to send the newly updated Web page.
  5165.     Send to -- Specify the name of the person to alert when the page content changes.
  5166.       3.    Exit and save your changes.
  5167.       4.    Select any Web page and drag it into the Page Minder folder.
  5168.     The Page Minder agent runs based on the times you selected in the Internet Options document.
  5169.     Note
  5170.       You can run the Page Minder agent on pages from authenticated servers where you are required to supply a username and password before you can gain access to the page. Similarly, you can run the agent through an authenticated proxy server where you have to supply a username and password to gain access to the Internet. As long as you have successfully retrieved the page during your current Notes session, Notes stores your username and password in a field on the Web page and pulls it from there when it runs the agent.  For security purposes, if you run this agent on authenticated servers or through authenticated proxy servers, you should encrypt your database so that the field is not visible to others.
  5171. Using Web Ahead: Automatically following links on Web pages (Personal Web Navigator)
  5172.     Web pages usually contain URLs that point to other Web pages. You can run a background agent called Web Ahead that retrieves all the Web pages specified by the URLs on a particular Web page and saves all the resulting Web pages in your database for you to read later. You can set the agent to retrieve the URLs several levels down from the page you specify. 
  5173.     Note
  5174.       Web Ahead only runs while your Notes workstation is running.
  5175.     Enabling the Web Ahead agent
  5176.     To enable the Web Ahead agent (you only need to do this once):
  5177.       1.    Choose File - Tools - User Preferences and select "Enable scheduled local agents."
  5178.       2.    Open the Personal Web Navigator database and choose Actions - Internet Options.
  5179.       3.    Click the Enable Web Ahead button next to the agent. 
  5180.       4.    In the "Choose Server To Run On" dialog box, choose Local and click OK. (This dialog box only appears if you have not yet enabled the agent in this database.)
  5181.     Running the Web Ahead agent
  5182.     To run Web Ahead on a Web page:
  5183.       1.    Choose Actions - Internet Options.
  5184.       2.    In the Web Ahead agent preferences section, enter the number of levels of pages you want the agent to retrieve.
  5185.       3.    Exit and save your changes.
  5186.       4.    Select any Web page and drag it into the Web Ahead folder.
  5187.     The Web Ahead agent runs every half hour.
  5188.     Note
  5189.       You can run the Web Ahead agent on pages from authenticated servers where you are required to supply a username and password before you can gain access to the page. Similarly, you can run the agent through an authenticated proxy server where you have to supply a username and password to gain access to the Internet. As long as you have successfully retrieved the page during your current Notes session, Notes stores your username and password in a field on the Web page and pulls it from there when it runs the agent.  For security purposes, if you run this agent on authenticated servers or through authenticated proxy servers, you should encrypt your database so that the field is not visible to others.
  5190.     '++LotusScript Development Environment:2:5:(Options):0:74
  5191. Option Public
  5192. '++LotusScript Development Environment:2:5:(Forward):0:1
  5193. Declare Sub RefreshPage
  5194. Declare Sub InstantiateObjects
  5195. Declare Sub OpenHomeURL
  5196. Declare Sub OpenSearchSite (docLocal As NotesDocument)
  5197. Declare Sub CreateNotesLink (docLocal As NotesDocument)
  5198. Declare Sub CopyDocumentToSharedDatabase (docLocal As NotesDocument, url As String) 
  5199. Declare Sub CreateRatingDocument (docLocal As NotesDocument, url As String, title As String)
  5200. Declare Sub ReduceToLink (docLocal As NotesDocument)
  5201. Declare Sub GetProfileDocument
  5202. Declare Function LocationOK As Integer
  5203. Declare Sub  ImportFavorites
  5204. Declare Sub FavoriteExtractAddress(posBegin As Integer)
  5205. Declare Sub CreateFavoriteDocument   
  5206. Declare Sub FavoriteProcessOneLine
  5207. Declare Sub ImportBookmarks
  5208. Declare Sub NavigatorExtractAddress(posBegin As Integer)
  5209. Declare Sub ShrinkFolderName
  5210. Declare Sub NavigatorProcessOneLine
  5211. Declare Sub GetFolderName(posStart As Integer)
  5212. Declare Sub CreateNavigatorDocument
  5213. Declare Sub PrintWebDocument
  5214. Declare Sub WebNavHelp
  5215. Declare Sub IENextdoc(browserobject As Variant)    
  5216. Declare Sub IEPreviousDoc(browserobject As Variant)     
  5217. Declare Sub IEStop(browserobject As Variant)  
  5218. Declare Function GetCurrentLocation As String
  5219. Declare Sub IEForwardNote (doc As notesdocument, browserobject As Variant)
  5220. Declare Sub IERefreshPage(browserobject As Variant)     
  5221. Declare Sub IEOpenHome(browserobject As Variant)
  5222. Declare Sub IESearch(browserobject As Variant)
  5223. Declare Sub CreateIELink(url As String, title As String)
  5224. Declare Sub MoveToFolder(Source As NotesUIView,Target As Variant, Continue As Variant)
  5225. Declare Sub Initialize
  5226. Declare Function GetRegValue (szKey$, szValueName$) As String
  5227. Declare Sub SetRegValue(szKey$, szValueName$, szKeyValue)
  5228. Declare Function GetLocationItem (itemname As String) As Variant
  5229. Declare Sub SetLocationItem(itemname As String, itemvalue As String)
  5230. Declare Sub CreateIEBookmark(browserobject As Variant, folder As String)
  5231. Declare Sub RemoveObjects(doc As notesdocument)
  5232. Declare Sub GetCurrentFolders
  5233. Declare Sub ViewDelete
  5234. Declare Sub Browse
  5235. Declare Sub ViewForward(docLocal As notesdocument)
  5236. Declare Function DuplicateBookmark(szURL) As Integer
  5237. Declare Sub CheckRegistrySettings
  5238. Declare Function CompareValues(IEValue As String, NotesValue As Variant) As String
  5239. Declare Function ParseFilename(szPath As String) As String
  5240. Declare Sub NotesForwardNote(doc As notesdocument)
  5241. Declare Function ParseURL(url As String) As String
  5242. '++LotusScript Development Environment:2:5:(Declarations):0:10
  5243. 'this script library is used by the views and forms for sharing various scripts -> Home, Search, Share, Import Bookmarks, and Reduce
  5244. Dim w As NotesUIWorkspace
  5245. Dim session As NotesSession
  5246. Dim db As NotesDatabase
  5247. Dim dbShared As NotesDatabase
  5248. Dim docProfile As NotesDocument
  5249. Dim note As NotesDocument
  5250. Dim bookmark As NotesDocument
  5251. Dim bookmarkfolder As NotesView
  5252. Dim firstnavigatedone As Integer
  5253. Dim view As NotesView
  5254. Dim hFile As Integer
  5255. Dim numDirectories As Integer
  5256. Dim szPath As String
  5257. Dim szEntry As String
  5258. Dim szURL As String
  5259. Dim szTitle As String
  5260. Dim szFolder As String
  5261. Dim filenamepath As String
  5262. Dim filename As String
  5263. Dim fileflag As Integer
  5264. Dim Directories() As String
  5265. %INCLUDE "lsconst.lss"
  5266. ' This declares the routines used for retrieving key values
  5267. ' from the registry on a Windows 32 client.
  5268. ' NOTE: if you are running this app on a platform other than
  5269. ' Windows 32 Intel, then it will not work.
  5270. Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (Byval hKey&, Byval szSubKey$, Byval dwOptions&, Byval SAM&, hKey&) As Long
  5271. Declare Function RegCloseKey Lib "advapi32.dll" Alias "RegCloseKey" (Byval hKey&) As Long
  5272. Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (Byval hKey&, Byval szValue$, Byval dwReserved&, dwType&, Byval szValue$, lpdwBuf&) As Long
  5273. Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (Byval hKey&, Byval szValue$, Byval dwReserved&, Byval dwType&, Byval lpData$, Byval cbData&)  As Long
  5274. Const HKEY_CURRENT_USER = &H80000001
  5275. Const KEY_READ = &H00020019
  5276. Const KEY_SET_VALUE = &H0002
  5277. Dim RetCode As Long
  5278. Dim dwType As Long
  5279. Dim hKey As Long
  5280. Dim dwSize As Long
  5281. Dim lpData As String
  5282. Dim cbData As Long
  5283. '++LotusScript Development Environment:2:2:RefreshPage:1:8
  5284. Sub RefreshPage
  5285.      
  5286.      
  5287.      Dim currenturl As String  
  5288.      Dim currentdoc As notesuidocument
  5289.      Dim urldoc As notesdocument
  5290.      Dim docCollection As NotesDocumentCollection     
  5291.      Set docCollection = db.UnprocessedDocuments
  5292.      If (docCollection.Count = 0) Then
  5293.           Msgbox "You must select a document.",16,"Error"
  5294.           Exit Sub
  5295.      End If
  5296.      Set currentdoc = w.currentdocument
  5297.      currenturl=currentdoc.fieldgettext("URL") 
  5298.      Set urldoc = db.GetDocumentByURL(currenturl, 1)
  5299.      w.EditDocument False, urldoc
  5300.      w.viewrefresh
  5301. End Sub
  5302. '++LotusScript Development Environment:2:2:InstantiateObjects:1:8
  5303. Sub InstantiateObjects
  5304.      
  5305.      Set w = New NotesUIWorkspace
  5306.      Set session = New NotesSession
  5307.      Set db = session.CurrentDatabase
  5308.      Set view = db.GetView("(Internet Profile)")
  5309.      Set docProfile = view.GetFirstDocument
  5310.      
  5311. End Sub
  5312. '++LotusScript Development Environment:2:2:OpenHomeURL:1:8
  5313. Sub OpenHomeURL
  5314.      On Error 4005 Goto LoadHomeURL
  5315.      
  5316.      Dim urldoc As NotesDocument
  5317.      
  5318.      
  5319.      
  5320.      If (docProfile Is Nothing) Then GetProfileDocument
  5321.      If (docProfile Is Nothing) Then
  5322.           Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  5323.           Exit Sub 
  5324.      End If
  5325.      If (docProfile.openurl(0) <> "") Then 
  5326.           w.URLOpen docProfile.openurl(0), 2, 0, "", "", "", "", "", True
  5327.      Else
  5328.           Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  5329.           Exit Sub 
  5330.      End If
  5331.      Exit Sub
  5332. LoadHomeURL:
  5333.      w.URLOpen docProfile.openurl(0), 2, 0, "", "", "", "", "", True
  5334.      Exit Sub
  5335. End Sub
  5336. '++LotusScript Development Environment:2:2:OpenSearchSite:1:8
  5337. Sub OpenSearchSite (docLocal As NotesDocument)
  5338.      
  5339.      
  5340.      Dim SearchDoc As notesdocument
  5341.      If (docProfile Is Nothing) Then GetProfileDocument
  5342.      If (docProfile Is Nothing) Then
  5343.           Msgbox "You need to specify a Search Site URL to open. Choose Actions - Internet Options from the menu."
  5344.           Exit Sub 
  5345.      End If
  5346.        'we need to determine if the current document exists or has the $Index field
  5347.      
  5348.      If (docLocal Is Nothing) Or Not (docLocal.HasItem("$Index")) Then
  5349.           w.URLOpen docProfile.SearchURL(0)   
  5350.           
  5351.      Else
  5352.           'open the url specified
  5353.           
  5354.           i = docLocal.GetItemValue("$Index")
  5355.           pos% = Instr(docLocal.URL(0),"?")
  5356.           If (pos% > 0) Then
  5357.                url$ = Right$(docLocal.URL(0),Len(docLocal.URL(0)) - pos%) & " ?"
  5358.           Else
  5359.                url$ = docLocal.URL(0) & "?"
  5360.           End If
  5361.           index$ = url$ & Inputbox$(i(0),"Search Internet Server")
  5362.           If index$<> "" Then 
  5363.                w.urlopen index$
  5364.           End If
  5365.      End If
  5366. End Sub
  5367. '++LotusScript Development Environment:2:2:CreateNotesLink:1:8
  5368. Sub CreateNotesLink (docLocal As NotesDocument)
  5369.      
  5370.      Dim docMail As NotesDocument
  5371.      Dim rtitem As NotesRichTextItem
  5372.      
  5373.      
  5374.      Set docMail = New NotesDocument(db)
  5375.      Set rtitem = New NotesRichTextItem(docMail,"Body")
  5376.      docMail.Form = "Memo"
  5377.      Call rtitem.AppendText(docLocal.url(0))
  5378.      docMail.Subject = docLocal.Title(0)          
  5379.      docMail.Send False,docLocal.ForwardTo(0)               
  5380. End Sub
  5381. '++LotusScript Development Environment:2:2:CopyDocumentToSharedDatabase:1:8
  5382. Sub CopyDocumentToSharedDatabase (docLocal As NotesDocument, url As String) 
  5383.      Dim webdoc As notesdocument
  5384.      If (docProfile Is Nothing) Then GetProfileDocument
  5385.      If (docProfile Is Nothing) Then
  5386.           Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  5387.           Exit Sub 
  5388.      End If
  5389.      If  (docProfile.WebDatabase(0) = "") Then
  5390.           Msgbox "You need to specify the shared server and database. Choose Actions - Internet Options from the menu."
  5391.           Exit Sub
  5392.      End If
  5393.      Set dbShared = New NotesDatabase(docProfile.WebServer(0),docProfile.WebDatabase(0))  
  5394.      If Not (dbShared.IsOpen) Then
  5395.           Msgbox "Can't open the shared database"
  5396.           Exit Sub
  5397.      End If
  5398.      If docLocal.form(0) = "WebBrowserForm" Then 
  5399.           
  5400.           Set webdoc = dbshared.getdocumentbyurl(url)
  5401.           dbShared.Close
  5402.      Else
  5403.           Set webdoc = dbshared.getdocumentbyurl(url)
  5404.           dbShared.Close
  5405.      End If
  5406. End Sub
  5407. '++LotusScript Development Environment:2:2:CreateRatingDocument:1:8
  5408. Sub CreateRatingDocument (docLocal As NotesDocument, url As String, title As String)
  5409.      Dim docRating As NotesDocument
  5410.      If (docProfile Is Nothing) Then GetProfileDocument
  5411.      If (docProfile Is Nothing) Then
  5412.           Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  5413.           Exit Sub 
  5414.      End If
  5415.      If  (docProfile.WebDatabase(0) = "") Then
  5416.           Msgbox "You need to specify the shared server and database. Choose Actions - Internet Options from the menu."
  5417.           Exit Sub
  5418.      End If
  5419.      Set dbShared = New NotesDatabase(docProfile.WebServer(0),docProfile.WebDatabase(0))  
  5420.      If Not (dbShared.IsOpen) Then
  5421.           Msgbox "Can't open the shared database"
  5422.           Exit Sub
  5423.      End If
  5424.      'create the remote document and add some fields to it
  5425.      Set docRating = New NotesDocument(dbShared)
  5426.      docRating.Form = "Person Rating Form"
  5427.      docRating.Rating = docLocal.Rating
  5428.      docRating.Content = docLocal.Content
  5429.      docRating.Comments = docLocal.Comments
  5430.      docRating.Author = session.UserName
  5431.      docRating.URL = URL
  5432.      docRating.Title = Title
  5433.      docRating.Save True, True
  5434.      dbShared.Close     
  5435. End Sub
  5436. '++LotusScript Development Environment:2:2:ReduceToLink:1:8
  5437. Sub ReduceToLink (docLocal As NotesDocument)
  5438.      
  5439.      If docLocal.hasitem("Body") Then
  5440.           docLocal.RemoveItem "Body"
  5441.           docLocal.RemoveItem "HTMLSource"
  5442.           docLocal.RemoveItem "HTMLBody"
  5443.           docLocal.RemoveItem "$Background"
  5444.           docLocal.RemoveItem "$FILE"
  5445.           docLocal.RemoveItem "$OLEOBJINFO"
  5446.           docLocal.RemoveItem "URLLinks1"
  5447.           docLocal.RemoveItem "WebAheadStatus"
  5448.           docLocal.RemoveItem "WebAgentError"
  5449.           docLocal.RemoveItem "PageMinderStatus"
  5450.           docLocal.bookmark = "1"
  5451.           docLocal.Save True,True
  5452.      Else
  5453.           docLocal.RemoveItem "$Body"
  5454.           docLocal.RemoveItem "HTMLSource"
  5455.           docLocal.RemoveItem "$Background"
  5456.           docLocal.RemoveItem "$FILE"
  5457.           docLocal.RemoveItem "$OLEOBJINFO"
  5458.           docLocal.RemoveItem "URLLinks1"
  5459.           docLocal.RemoveItem "WebAheadStatus"
  5460.           docLocal.RemoveItem "WebAgentError"
  5461.           docLocal.RemoveItem "PageMinderStatus"
  5462.           docLocal.Bookmark = "1"
  5463.           docLocal.Save True,True
  5464.      End If
  5465. End Sub
  5466. '++LotusScript Development Environment:2:2:GetProfileDocument:1:8
  5467. Sub GetProfileDocument
  5468.      Dim view As NotesView
  5469.      Set view = db.GetView("Internet Profiles")
  5470.      Set docProfile = view.GetFirstDocument
  5471. End Sub
  5472. '++LotusScript Development Environment:2:1:LocationOK:1:8
  5473. Function LocationOK As Integer
  5474.      
  5475.      '*
  5476.      '*  This function verifies that the current location settings are correct for local web retrievals.
  5477.      '*
  5478.      
  5479.      LocationOK = True
  5480.      Dim currentbrowser As String
  5481.      Dim MailServer As String
  5482.      currentbrowser = GetLocationItem("WebRetriever")
  5483.      If CurrentBrowser <> "3" Or CurrentBrowser <> "1" Then
  5484.           Msgbox "Your Browser setting for Notes is not set to retrieve in Notes.  Edit your current location to change the browser setting to Notes.", 16, "Error"
  5485.           LocationOK = False
  5486.           Exit Function
  5487.      End If
  5488.      MailServer = GetLocationItem("MailServer")
  5489.      If MailServer = "" Then
  5490.           Msgbox "You do not have a mail file/server specified.  Use File Mobile Edit Current Location... to set them.", 16, "Error"
  5491.           LocationOK = False
  5492.           Exit Function
  5493.      End If
  5494.      
  5495. End Function
  5496. '++LotusScript Development Environment:2:2:ImportFavorites:1:8
  5497. Sub  ImportFavorites
  5498.      InstantiateObjects
  5499.      Set note = New NotesDocument(db)
  5500.      szFolder = "Favorites"
  5501.      numDirectories = 0
  5502.      Redim Directories(20)
  5503.      fileflag = False
  5504.      
  5505.      If(w.DialogBox("(ImportFavorite)",True,True,False,,,,"Import Favorites",note)) Then
  5506.           'get the file to open     
  5507.           szPath = note.BookMarkFile(0)
  5508.           If (szPath = "") Then 
  5509.                Exit Sub
  5510.           Elseif (Right$(szPath,3) = "url" ) Then
  5511.                'file is specified not path parse out filename and go directly to process file
  5512.                filenamepath = szPath
  5513.                fileflag = True
  5514.                Goto ProcessFile
  5515.           Elseif (Right$(szPath,1) <> "\") Then 
  5516.                szPath  = szPath & "\"
  5517.           End If        
  5518.           filename = Dir$(szPath ,ATTR_DIRECTORY)
  5519.           
  5520.           While (filename <>"")
  5521.                If (filename <> ".") And (filename <> "..") Then
  5522.                     filenamepath = szPath & filename
  5523.                     retType = Getfileattr(filenamepath)
  5524.                     If Not(retType = ATTR_DIRECTORY) Then
  5525. ProcessFile:
  5526.                          hFile = Freefile
  5527.                          
  5528. 'open the file     
  5529.                          Open filenamepath For Input As hFile
  5530.                          
  5531. 'read in a line from the file
  5532.                          Do Until Eof(hFile)
  5533.                               Line Input #hFile,szEntry
  5534.                               Call FavoriteProcessOneLine
  5535.                          Loop
  5536.                     Else
  5537. 'this is a directory
  5538.                          Directories(counter) = filename
  5539.                          counter = counter + 1
  5540.                     End If
  5541.                End If
  5542.                If fileflag Then Exit Sub
  5543.                filename = Dir()
  5544.           Wend
  5545.      End If
  5546. 'scan subdirectories if need be
  5547.      If (counter > 0) Then
  5548.           For x = 0 To (counter-1)
  5549.                szFolder = "Bookmarks\" & Directories(x)
  5550.                szSubPath = szPath & Directories(x) & "\"
  5551.                filename = Dir$(szSubPath,ATTR_DIRECTORY)
  5552.                While (filename <>"")
  5553.                     If (filename <> ".") And (filename <> "..") Then
  5554.                          retType = Getfileattr(szSubPath & filename)
  5555.                          If Not(retType = ATTR_DIRECTORY) Then
  5556.                               hFile = Freefile                              
  5557. 'open the file     
  5558.                               Open szSubPath  & filename For Input As hFile
  5559.                               
  5560. 'read in a line from the file
  5561.                               Do Until Eof(hFile)
  5562.                                    Line Input #hFile,szEntry
  5563.                                    Call FavoriteProcessOneLine
  5564.                               Loop
  5565.                          End If
  5566.                     End If
  5567.                     filename = Dir()
  5568.                Wend               
  5569.           Next
  5570.           
  5571.      End If
  5572. End Sub
  5573. '++LotusScript Development Environment:2:2:FavoriteExtractAddress:1:8
  5574. Sub FavoriteExtractAddress(posBegin As Integer)
  5575.      
  5576. 'get the position of the closing quote
  5577.      szURL = Right$(szEntry,Len(szEntry) - posBegin+1)
  5578. End Sub
  5579. '++LotusScript Development Environment:2:2:CreateFavoriteDocument:1:8
  5580. Sub CreateFavoriteDocument   
  5581.      
  5582.      'Before we create the bookmark document we need to make sure that one does not already exist
  5583.      If Not DuplicateBookmark(szURL) Then
  5584.           Dim nulldoc As notesdocument
  5585.           Dim title As String
  5586.           Set bookmark = New NotesDocument(db)
  5587.           If fileflag Then
  5588.                title = Parsefilename(szPath)
  5589.                bookmark.title = Left$(title, Len(title)-4)
  5590.           Else
  5591.                bookmark.title = Left$(filename, Len(filename)-4)
  5592.           End If
  5593.           
  5594.           bookmark.URL =  szURL
  5595.           bookmark.bookmark = "1"
  5596.           bookmark.form = "HTMLForm"
  5597.           Call bookmark.Save(True,False)
  5598.           Call bookmark.PutInFolder(szFolder)
  5599.           If docprofile.keeppage(0) = "0" Then
  5600.                If GetLocationItem("WebLocation")(0) = "1" Then
  5601.                     
  5602.                     Set nulldoc = db.getdocumentbyurl(szURL, 0,0,"","","","","",True)
  5603.                End If
  5604.           End If
  5605.      End If
  5606.      
  5607. End Sub
  5608. '++LotusScript Development Environment:2:2:FavoriteProcessOneLine:1:8
  5609. Sub FavoriteProcessOneLine
  5610. 'we have just read one line from the bookmark file
  5611. 'see if this line has one of two entries in it
  5612.      Dim pos As Integer
  5613.      
  5614. 'look for an http reference
  5615.      pos = Instr(1,szEntry,"=",5)
  5616.      If (pos > 0) Then
  5617.           FavoriteExtractAddress(pos+1)
  5618.           If (szURL <> "") Then Call CreateFavoriteDocument
  5619.           Exit Sub
  5620.      End If
  5621. End Sub
  5622. '++LotusScript Development Environment:2:2:ImportBookmarks:1:8
  5623. Sub ImportBookmarks
  5624.      InstantiateObjects
  5625.      Set note = New NotesDocument(db)
  5626.      szFolder = "Favorites and Bookmarks"
  5627.      
  5628.      If(w.DialogBox("(ImportBookmark)",True,True,False,,,,"Import Bookmark",note)) Then
  5629.           'get the file to open     
  5630.           szPath = note.BookMarkFile(0)
  5631.           If (szPath = "") Then Exit Sub
  5632.           hFile = Freefile
  5633.           
  5634. 'open the file     
  5635.           Open szPath For Input As hFile
  5636.           
  5637. 'read in a line from the file
  5638.           Do Until Eof(hFile)
  5639.                Line Input #hFile,szEntry
  5640.                Call NavigatorProcessOneLine
  5641.           Loop
  5642.      End If
  5643.      
  5644. 'we need to close the file
  5645.      Close hFile
  5646. End Sub
  5647. '++LotusScript Development Environment:2:2:NavigatorExtractAddress:1:8
  5648. Sub NavigatorExtractAddress(posBegin As Integer)
  5649.      Dim posEnd As Integer
  5650.      Dim posTITLEBegin As Integer
  5651.      Dim posTITLEEnd As Integer
  5652.      
  5653. 'get the position of the closing quote
  5654.      posEnd = Instr(posBegin,szEntry,|"|,5)
  5655.      If posEnd = 0 Then 
  5656.           szURL = ""
  5657.           Exit Sub
  5658.      End If
  5659.      szURL = Mid$(szEntry,posBegin,(posEnd-posBegin))
  5660. 'now, we need to get the title
  5661.      posTITLEBegin = Instr(posEnd,szEntry,">",5)
  5662.      If (posTITLEBegin = 0) Then
  5663.           szTitle = ""
  5664.      Else
  5665.           posTITLEEnd = Instr(posTITLEBegin,szEntry,"</a",5)
  5666.           szTitle = Mid$(szEntry,posTITLEBegin+1,(posTITLEEnd-posTITLEBegin)-1)               
  5667.      End If
  5668. End Sub
  5669. '++LotusScript Development Environment:2:2:ShrinkFolderName:1:8
  5670. Sub ShrinkFolderName
  5671.      Dim posCurrent As Integer
  5672.      Dim posHold As Integer
  5673.      
  5674. 'posCurrent is the new position of the "\" character
  5675. 'posHold keeps the most recent position of the "\" character
  5676.      
  5677.      posCurrent = Instr(1,szFolder,"\",5)
  5678.      While(posCurrent > 0)
  5679.           posHold = posCurrent
  5680.           posCurrent = Instr(posHold+1,szFolder,"\",5)
  5681.      Wend
  5682.      If (posHold > 0) Then szFolder = Left$(szFolder,posHold-1)
  5683. End Sub
  5684. '++LotusScript Development Environment:2:2:NavigatorProcessOneLine:1:8
  5685. Sub NavigatorProcessOneLine
  5686. 'we have just read one line from the bookmark file
  5687. 'see if this line has one of two entries in it
  5688.      Dim pos As Integer
  5689.      
  5690. 'first, look for the beginning of a folder
  5691.      pos = Instr(1,szEntry,"h3",5)
  5692.      If (pos > 0) Then 
  5693.           GetFolderName(pos)
  5694.           Exit Sub
  5695.      End If
  5696. 'we didn't find a folder, so look for an http reference
  5697.      pos = Instr(1,szEntry,"http",5)
  5698.      If (pos > 0) Then
  5699.           NavigatorExtractAddress(pos)
  5700.           If (szURL <> "") Then Call CreateNavigatorDocument
  5701.           Exit Sub
  5702.      End If
  5703. 'check for an ftp reference
  5704.      pos = Instr(1,szEntry,"ftp",5)
  5705.      If (pos > 0) Then
  5706.           NavigatorExtractAddress(pos)
  5707.           If(szURL <> "") Then Call CreateNavigatorDocument
  5708.           Exit Sub
  5709.      End If
  5710. 'this isn't a folder, nor is it an http ref; look for the closing of a folder
  5711.      pos = Instr(1,szEntry,"</DL>",5)
  5712.      If (pos > 0) Then Call ShrinkFolderName
  5713. End Sub
  5714. '++LotusScript Development Environment:2:2:GetFolderName:1:8
  5715. Sub GetFolderName(posStart As Integer)
  5716. 'gets the name of the folder
  5717.      Dim posFolderBegin
  5718.      Dim posFolderEnd
  5719.      
  5720.      posFolderBegin = Instr(posStart,szEntry,|">|,5)
  5721.      If (posFolderBegin > 0) Then
  5722.           posFolderEnd = Instr(posFolderBegin,szEntry,"<",5)
  5723.           szFolder = szFolder & "\" & Mid$(szEntry,posFolderBegin+2,posFolderEnd - posFolderBegin-2)
  5724.      End If
  5725. End Sub
  5726. '++LotusScript Development Environment:2:2:CreateNavigatorDocument:1:8
  5727. Sub CreateNavigatorDocument
  5728.      'Before we create the bookmark document, make sure that it doesn't already exist
  5729.      If Not DuplicateBookmark(szURL) Then
  5730.           Dim nulldoc As notesdocument
  5731.           Set bookmark = New NotesDocument(db)
  5732.           bookmark.URL =  szURL
  5733.           bookmark.Title = szTitle
  5734.           bookmark.Subject = szTitle    
  5735.           bookmark.bookmark = "1"
  5736.           bookmark.form = "HTMLForm"
  5737.           Call bookmark.Save(True,False)
  5738.           Call bookmark.PutInFolder(szFolder)
  5739.             'If keep page option is manual or retrievals are set to no retrievals, don't do the nonblocking retrieval
  5740.           If docprofile.keeppage(0) = "0" Then
  5741.                If GetLocationItem("WebLocation")(0) = "1" Then
  5742.                     
  5743.                     Set nulldoc = db.getdocumentbyurl(szURL, 0,0,"","","","","",True)
  5744.                End If
  5745.           End If
  5746.      End If
  5747. End Sub
  5748. '++LotusScript Development Environment:2:2:PrintWebDocument:1:8
  5749. Sub PrintWebDocument
  5750.      
  5751.      On Error Goto ErrorRoutine
  5752.      
  5753.      Dim docLocal As NotesDocument
  5754.      Dim uidoc As notesuidocument
  5755.      Dim docCollection As NotesDocumentCollection     
  5756.      Set docCollection = db.UnprocessedDocuments
  5757.      If (docCollection.Count = 0) Then
  5758.           Msgbox "You must select a document.",16,"Error"
  5759.           Exit Sub
  5760.      Else
  5761.           For j = 1 To docCollection.Count
  5762.                Set docLocal = docCollection.getnthdocument(j)
  5763.                Set uidoc = w.editdocument(False, docLocal)
  5764.                Call uidoc.print
  5765.                Call uidoc.close
  5766.           Next
  5767.      End If
  5768.      Exit Sub
  5769. ErrorRoutine:
  5770.      Messagebox Error & " (PrintWebDocument)"
  5771.      Exit Sub
  5772. End Sub
  5773. '++LotusScript Development Environment:2:2:WebNavHelp:1:8
  5774. Sub WebNavHelp
  5775.      On Error Goto ErrorRoutine
  5776.      
  5777.      Dim PrivateAddressBook As notesdatabase
  5778.      Dim CurrentLocation As notesdocument
  5779.      Dim LocationString As String    
  5780.      Dim helpdb As New notesdatabase("", "")
  5781.      Dim workspace As New NotesUIWorkspace
  5782.      Dim Session As New notessession
  5783.      
  5784.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  5785.      LocationString = Session.GetEnvironmentString ( "Location", True)
  5786.      
  5787.      If (PrivateAddressBook Is Nothing) Then
  5788.           If Helpdb.open("", "help4.nsf") Then 
  5789.                Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  5790.           Elseif Helpdb.open("", "helplt4.nsf") Then
  5791.                Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  5792.           Else
  5793.                Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  5794.           End If
  5795.           Exit Sub
  5796.      End If
  5797.      
  5798.      
  5799.      If LocationString <> "" Then
  5800.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  5801.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  5802.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  5803.           
  5804.           If Not (CurrentLocation Is Nothing) Then
  5805.                If CurrentLocation.MailServer(0) <> "" Then
  5806.                     If Helpdb.open("", "help4.nsf") Then 
  5807.                          Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  5808.                     Elseif Helpdb.open("", "helplt4.nsf") Then
  5809.                          Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  5810.                     Elseif Helpdb.open(CurrentLocation.MailServer(0), "help4.nsf") Then
  5811.                          Call workspace.OpenDatabase ( CurrentLocation.MailServer(0), "help4.nsf", "Web")
  5812.                     Elseif Helpdb.open(CurrentLocation.MailServer(0), "helplt4.nsf") Then
  5813.                          Call workspace.OpenDatabase ( CurrentLocation.MailServer(0), "helplt4.nsf", "Web")
  5814.                     Else
  5815.                          Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  5816.                     End If
  5817.                Else
  5818.                     If Helpdb.open("", "help4.nsf") Then 
  5819.                          Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  5820.                     Elseif Helpdb.open("", "helplt4.nsf") Then
  5821.                          Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  5822.                     Else
  5823.                          'Mail server is blank
  5824.                          Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  5825.                     End If
  5826.                End If
  5827.           Else
  5828.                If Helpdb.open("", "help4.nsf") Then 
  5829.                     Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  5830.                Elseif Helpdb.open("", "helplt4.nsf") Then
  5831.                     Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  5832.                Else
  5833.                     'Location document is not found
  5834.                     Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  5835.                End If
  5836.           End If
  5837.      Else
  5838.           If Helpdb.open("", "help4.nsf") Then 
  5839.                Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  5840.           Elseif Helpdb.open("", "helplt4.nsf") Then
  5841.                Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  5842.           Else
  5843.                'Location string in notes.ini is blank
  5844.                Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  5845.           End If
  5846.      End If
  5847.      Exit Sub
  5848. ErrorRoutine:
  5849.      Messagebox Error & " (WebNavHelp)"
  5850.      Exit Sub
  5851. End Sub
  5852. '++LotusScript Development Environment:2:2:IENextdoc:1:8
  5853. Sub IENextdoc(browserobject As Variant)    
  5854.      On Error Goto ErrorRoutine
  5855.      browserobject.GoForward
  5856.      Exit Sub
  5857. ErrorRoutine:
  5858.      Messagebox "No next entry in history list.", 16, "Internet Explorer"
  5859.      Exit Sub
  5860. End Sub
  5861. '++LotusScript Development Environment:2:2:IEPreviousDoc:1:8
  5862. Sub IEPreviousDoc(browserobject As Variant)     
  5863.      On Error Goto ErrorRoutine
  5864.      browserobject.GoBack     
  5865.      Exit Sub
  5866. ErrorRoutine:
  5867.      Messagebox "No previous entry in history list.", 16, "Internet Explorer"
  5868.      Exit Sub
  5869. End Sub
  5870. '++LotusScript Development Environment:2:2:IEStop:1:8
  5871. Sub IEStop(browserobject As Variant)  
  5872.      On Error Goto ErrorRoutine
  5873.      browserobject.Stop    
  5874.      Exit Sub
  5875. ErrorRoutine:
  5876.      Messagebox Error & " (IEStop)"
  5877.      Exit Sub
  5878. End Sub
  5879. '++LotusScript Development Environment:2:1:GetCurrentLocation:1:8
  5880. Function GetCurrentLocation As String
  5881.      On Error Goto ErrorRoutine
  5882.      
  5883.      Dim AddBooks As Variant
  5884.      Dim PrivateAddressBook As notesdatabase
  5885.      Dim CurrentLocation As notesdocument
  5886.      Dim LocationString As String     
  5887.      
  5888.      Dim result As Variant
  5889.      
  5890.      AddBooks = Session. AddressBooks
  5891.      Forall j In AddBooks
  5892.           If (j.IsPrivateAddressBook) Then
  5893.                If  j.open("","") Then
  5894.                     LocationString = Session.GetEnvironmentString ( "Location", True)
  5895.                     If LocationString <> "" Then
  5896.                          Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  5897.                          LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  5898.                          Set CurrentLocation = j.getdocumentbyid(LocationID$)
  5899.                          GetCurrentLocation = CurrentLocation.WebRetriever(0)
  5900.                          Exit Forall
  5901.                     Else
  5902.                          Print "Couldn't find Current Location document."
  5903.                          Exit Function
  5904.                     End If
  5905.                End If
  5906.           End If
  5907.      End Forall
  5908.      
  5909.      Exit Function
  5910. ErrorRoutine:
  5911.      Messagebox Error & " (GetCurrentLocation)"
  5912.      Exit Function
  5913. End Function
  5914. '++LotusScript Development Environment:2:2:IEForwardNote:1:8
  5915. Sub IEForwardNote (doc As notesdocument, browserobject As Variant)
  5916.      
  5917.      On Error Goto ErrorRoutine
  5918.      On Error 4412 Goto nomailfile
  5919.      
  5920.      If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options")) Then   
  5921.           Select Case doc.ForwardOptions(0)
  5922.           Case "1" : 'user wants to forward the URL only
  5923.                Call CreateIELink(browserobject.locationurl, browserobject.locationname)
  5924.           Case "2" : 'user wants to send entire page
  5925.                Dim url As Variant
  5926.                Dim webdoc As notesdocument
  5927.                Dim uid As notesuidocument
  5928.                Dim uid2 As notesuidocument
  5929.                Dim uid3 As notesuidocument
  5930.                Print "Creating mail memo..."
  5931.                url = browserobject.locationurl               
  5932.                Set webdoc = db.getdocumentbyurl(url)
  5933.                webdoc.forward="1"
  5934.                webdoc.save True, False
  5935.                w.viewrefresh
  5936.                w.viewrefresh
  5937.                Set uid = w.editdocument(False, webdoc)   
  5938.                Set uid2=w.currentdocument
  5939.                uid2.forward
  5940.                Set uid3 = w.currentdocument
  5941.                uid.close     
  5942.                webdoc.removeitem "Forward"
  5943.                webdoc.save True, False
  5944.           End Select
  5945.           'remove any remaining fields that don't need to be carried around
  5946.           doc.RemoveItem "ForwardOptions" 
  5947.           doc.save True, False
  5948.      End If
  5949.      Exit Sub
  5950.      
  5951. ErrorRoutine:
  5952.      Messagebox  Err & Error & " (IEForwardNote)"
  5953.      Exit Sub
  5954.      
  5955. NoMailFile:
  5956.      uid.close
  5957.      Exit Sub
  5958.      
  5959. End Sub
  5960. '++LotusScript Development Environment:2:2:IERefreshPage:1:8
  5961. Sub IERefreshPage(browserobject As Variant)     
  5962.      On Error Goto ErrorRoutine
  5963.      browserobject.Refresh
  5964.      Exit Sub
  5965. ErrorRoutine:
  5966.      Messagebox Error & " (IERefreshPage)"
  5967.      Exit Sub
  5968. End Sub
  5969. '++LotusScript Development Environment:2:2:IEOpenHome:1:8
  5970. Sub IEOpenHome(browserobject As Variant)
  5971.      On Error Goto ErrorRoutine
  5972.      browserobject.GoHome
  5973.      Exit Sub
  5974. ErrorRoutine:
  5975.      Messagebox Error & " (IEOpenHome)"
  5976.      Exit Sub
  5977.      
  5978. End Sub
  5979. '++LotusScript Development Environment:2:2:IESearch:1:8
  5980. Sub IESearch(browserobject As Variant)
  5981.      On Error Goto ErrorRoutine   
  5982.      browserobject.GoSearch
  5983.      Exit Sub
  5984. ErrorRoutine:
  5985.      Messagebox Error & " (IESearch)"
  5986.      Exit Sub
  5987.      
  5988. End Sub
  5989. '++LotusScript Development Environment:2:2:CreateIELink:1:8
  5990. Sub CreateIELink(url As String, title As String)
  5991.      
  5992.      On Error Goto ErrorRoutine
  5993.      
  5994.      Dim uimaildoc As notesuidocument
  5995.      Dim docMail As NotesDocument
  5996.      Dim maildb As New notesdatabase("", "")
  5997.      Call maildb.openmail
  5998.      If maildb.isopen Then
  5999.           Call w.composedocument(maildb.server, maildb.filepath, "memo")
  6000.           Set uimaildoc = w.currentdocument
  6001.           Set docmail = uimaildoc.document
  6002.           Call uimaildoc.fieldsettext("Body", URL)
  6003.           Call uimaildoc.fieldsettext("Subject",   Title)
  6004.           Exit Sub
  6005.      Else
  6006.           Messagebox "Unable to open the mail file that is specified in your current location."
  6007.           Exit Sub
  6008.      End If
  6009.      
  6010. ErrorRoutine:
  6011.      Messagebox Err & Error & " (CreateIELink)"
  6012.      Exit Sub
  6013.      
  6014.      
  6015. End Sub
  6016. '++LotusScript Development Environment:2:2:MoveToFolder:1:8
  6017. Sub MoveToFolder(Source As NotesUIView,Target As Variant, Continue As Variant)
  6018.      Dim note As notesdocument
  6019.      Dim doc As notesdocument
  6020.      Dim db As notesdatabase
  6021.      Dim s As New notessession
  6022.      
  6023.      On Error Goto ErrorRoutine
  6024.      
  6025.      If target = "Web Bots\Page Minder" Or Target = "Web Bots\Web Ahead" Or (Instr(1, target, "Favorites") =1) Then
  6026.           Set db = s.currentdatabase
  6027.           For j = 1 To Source.Documents.Count  
  6028.                Set doc = source.documents.getnthdocument(j)
  6029.                If doc.form(0) = "WebBrowserForm" Then
  6030.                     Set note = db.getdocumentbyurl(doc.url(0))
  6031.                     
  6032.                     Call note.putinfolder(target)
  6033.                     Continue = False
  6034.                     Print "Moved to " + Cstr(target)
  6035.                End If
  6036.           Next
  6037.      End If
  6038.      Exit Sub
  6039.      
  6040. ErrorRoutine:
  6041.      Messagebox Error & " (MoveToFolder)"
  6042.      Exit Sub
  6043. End Sub
  6044. '++LotusScript Development Environment:2:2:Initialize:1:10
  6045. Sub Initialize
  6046.      
  6047. End Sub
  6048. '++LotusScript Development Environment:2:1:GetRegValue:1:8
  6049. Function GetRegValue (szKey$, szValueName$) As String
  6050.      Dim szValue As String*200
  6051.      
  6052.      hKey = 0
  6053.      RetCode = RegOpenKeyEx (HKEY_CURRENT_USER, szKey, 0, KEY_READ, hKey)
  6054.      If RetCode <> 0 Then
  6055. '          Print "RegOpenKeyEx: " & RetCode
  6056.           Exit Function
  6057.      End If
  6058.      dwType = 0
  6059.      dwSize = 200
  6060.      RetCode = RegQueryValueEx (hKey, szValueName, 0, dwType, szValue, dwSize) 
  6061.      If RetCode <> 0 Then
  6062. '          Print "RegQueryValueEx: " & RetCode
  6063.           Exit Function
  6064.      End If
  6065.      Call RegCloseKey (hKey)
  6066.      
  6067.      GetRegValue = szValue
  6068. Done:
  6069. End Function
  6070. '++LotusScript Development Environment:2:2:SetRegValue:1:8
  6071. Sub SetRegValue(szKey$, szValueName$, szKeyValue)
  6072.      
  6073.      hKey = 0
  6074.      Dim szValue As String*200
  6075.      
  6076.      hKey = 0
  6077.      RetCode = RegOpenKeyEx (HKEY_CURRENT_USER, szKey, 0, KEY_SET_VALUE, hKey)
  6078.      If RetCode <> 0 Then
  6079.           Print "RegOpenKeyEx: " & RetCode
  6080.           Exit Sub
  6081.      End If
  6082.      
  6083.      dwSize = 200
  6084.      lpData = szKeyValue
  6085.      cbData = Len(szKeyValue)
  6086.      RetCode = RegSetValueEx (hKey, szValueName, 0, 1, lpData$, cbData) 
  6087.      If RetCode <> 0 Then
  6088.           Print "RegLSetValueEx: " & RetCode
  6089.           Exit Sub
  6090.      End If
  6091.      
  6092.      
  6093.      Call RegCloseKey (hKey)
  6094.      
  6095. End Sub
  6096. '++LotusScript Development Environment:2:1:GetLocationItem:1:8
  6097. Function GetLocationItem (itemname As String) As Variant
  6098.      
  6099.      '*
  6100.      '*  This function returns a data item from the current location note
  6101.      '*
  6102.      
  6103.      InstantiateObjects
  6104.      GetLocationItem = ""
  6105.      Dim PrivateAddressBook As notesdatabase
  6106.      Dim CurrentLocation As notesdocument
  6107.      Dim LocationString As String     
  6108.      
  6109.      
  6110.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  6111.      
  6112.      If (PrivateAddressBook Is Nothing) Then
  6113.           Print "Warning:  Cannot open private address book."
  6114.           Exit Function
  6115.      End If
  6116.      
  6117.      LocationString = Session.GetEnvironmentString ( "Location", True)
  6118.      
  6119.      If LocationString <> "" Then
  6120.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6121.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6122.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  6123.           If Not (CurrentLocation Is Nothing) Then
  6124.                GetLocationItem = CurrentLocation.getitemvalue(itemname)
  6125.           Else
  6126.                Print  "Warning:  Unable to verify current location settings.  Can't find location document."
  6127.                Exit Function
  6128.           End If
  6129.      Else
  6130.           Print "Warning:  Unable to verify current location settings.  Location string is empty." 
  6131.           Exit Function
  6132.      End If     
  6133. End Function
  6134. '++LotusScript Development Environment:2:2:SetLocationItem:1:8
  6135. Sub SetLocationItem(itemname As String, itemvalue As String)
  6136.      '*
  6137.      '*  This routine sets a data item in the current location note
  6138.      '*
  6139.      InstantiateObjects
  6140.      Dim PrivateAddressBook As notesdatabase
  6141.      Dim CurrentLocation As notesdocument
  6142.      Dim LocationString As String     
  6143.      
  6144.      
  6145.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  6146.      
  6147.      If (PrivateAddressBook Is Nothing) Then
  6148.           Print "Warning:  Cannot open private address book."
  6149.           Exit Sub
  6150.      End If
  6151.      
  6152.      LocationString = Session.GetEnvironmentString ( "Location", True)
  6153.      
  6154.      If LocationString <> "" Then
  6155.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6156.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6157.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  6158.           If Not (CurrentLocation Is Nothing) Then
  6159.                Call CurrentLocation.Replaceitemvalue(itemname, itemvalue)
  6160.                Call CurrentLocation.Save(True, False)
  6161.           Else
  6162.                Print  "Warning:  Unable to verify current location settings.  Can't find location document."
  6163.                Exit Sub
  6164.           End If
  6165.      Else
  6166.           Print "Warning:  Unable to verify current location settings.  Location string is empty." 
  6167.           Exit Sub
  6168.      End If     
  6169. End Sub
  6170. '++LotusScript Development Environment:2:2:CreateIEBookmark:1:8
  6171. Sub CreateIEBookmark(browserobject As Variant, folder As String)
  6172.      Set bookmark = New NotesDocument(db)
  6173.      bookmark.URL =  browserobject.LocationURL
  6174.      bookmark.Form = "bookmark"
  6175.      bookmark.Title = browserobject.Locationname
  6176.      bookmark.Subject = browserobject.Locationname
  6177.      bookmark.Imported = True     
  6178.      bookmark.bookmark = "1"
  6179.      Call bookmark.Save(True,False)
  6180.      Call bookmark.PutInFolder(folder)
  6181.      
  6182. End Sub
  6183. '++LotusScript Development Environment:2:2:RemoveObjects:1:8
  6184. Sub RemoveObjects(doc As notesdocument)
  6185.      Dim imagepage As notesdocument
  6186.      If doc.hasitem("$ImageList") Then
  6187.           Dim images As Variant
  6188.           images  = doc.getitemvalue("$ImageList")
  6189.           Forall j In images
  6190.                If j <> "" Then
  6191.                     Set imagepage = db.getdocumentbyurl(j)
  6192.                     imagepage.remove True
  6193.                End If
  6194.           End Forall
  6195.      End If
  6196. End Sub
  6197. '++LotusScript Development Environment:2:2:GetCurrentFolders:1:8
  6198. Sub GetCurrentFolders
  6199.      Dim allviews As Variant
  6200.      Dim allfolders() As String
  6201.      Dim x As Integer
  6202.      allviews=db.views
  6203.      Forall j In allviews
  6204.           If j.isfolder Then
  6205.                If Not (Instr(1,j.name, "Web Bots") = 1)  Then
  6206.                     Redim Preserve allfolders(x)
  6207.                     If (Instr(1, j.name, "\") <>0) Then
  6208.                          allfolders(x) = "   " & Right(j.name, Len(j.name)-(Instr(1,j.name, "\")+1)) 
  6209.                          x = x+1
  6210.                     Else
  6211.                          allfolders(x) = j.name
  6212.                          x = x+1
  6213.                     End If
  6214.                End If
  6215.           End If
  6216.      End Forall
  6217.      docprofile.folders = allfolders
  6218.      docprofile.save True, False
  6219. End Sub
  6220. '++LotusScript Development Environment:2:2:ViewDelete:1:8
  6221. Sub ViewDelete
  6222.      On Error Resume Next
  6223.      Dim doc As notesdocument
  6224.      Dim noteid As String
  6225.      noteid = ""
  6226.      Dim docCollection As NotesDocumentCollection     
  6227.      Set docCollection = db.UnprocessedDocuments
  6228.      If (docCollection.Count = 0) Then
  6229.           Msgbox "You must select a document.",16,"Error"
  6230.           Exit Sub
  6231.      End If
  6232.      Response = Msgbox ("This will permanently delete the selected page(s) from the database.  Do you want to continue?", 20, "Delete Document")
  6233.      If Response = 6 Then
  6234.           For j = 1 To docCollection.count 
  6235.                Set doc = docCollection.getnthdocument(j)
  6236.                If Instr(doc.HTTPContent_Type(0), "image") = 0 Then
  6237.                     Call RemoveObjects(doc)
  6238.                End If
  6239.                
  6240.                If doc.isuidocopen Then
  6241.                     noteid = doc.noteid
  6242.                     Delete doc
  6243.                     Set doc = db.getdocumentbyid (noteid)      
  6244.                     doc.remove True
  6245.                     w.viewrefresh 
  6246.                     w.viewrefresh
  6247.                Else
  6248.                     doc.Remove True
  6249.                     w.viewrefresh
  6250.                End If
  6251.           Next
  6252.      End If
  6253.      
  6254. End Sub
  6255. '++LotusScript Development Environment:2:2:Browse:1:8
  6256. Sub Browse
  6257.      Dim currbrowser As String
  6258.      Dim browserobjectcollection As notesdocumentcollection
  6259.      Dim browserdoc As notesdocument
  6260.      Dim iedoc As New notesdocument(db)
  6261.      Dim dt As New notesdatetime ("1/1/90")
  6262.      InstantiateObjects
  6263.      currbrowser = GetCurrentLocation
  6264.      If currbrowser = "0" Then
  6265.           OpenHomeURL
  6266.      Elseif currbrowser = "3" Then
  6267.           If docprofile.openurl(0) = "" Then
  6268.                Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  6269.                Exit Sub 
  6270.           End If
  6271.           
  6272.           Set BrowserObjectCollection = db.search(("Form = ""WebBrowserForm""& home = ""1"""), dt, 0)
  6273.           
  6274.           If BrowserObjectCollection.count <> 0 Then
  6275.                Set BrowserDoc = BrowserObjectCollection.getfirstdocument
  6276.                Call BrowserDoc.replaceitemvalue("url", docprofile.openurl(0))
  6277.                Call BrowserDoc.save(True, False)
  6278.                Call w.editdocument(False, browserdoc)                         
  6279.           Else
  6280.                Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  6281.                Call iedoc.replaceitemvalue("home", "1")
  6282.                Call iedoc.replaceitemvalue("SaveOptions", "1")
  6283.                Call ieDoc.replaceitemvalue("url", docprofile.openurl(0))
  6284.                Call ieDoc.save(True,False)
  6285.                Call w.viewrefresh
  6286.                Call w.editdocument(False, iedoc)
  6287.           End If
  6288.      End If
  6289. End Sub
  6290. '++LotusScript Development Environment:2:2:ViewForward:1:8
  6291. Sub ViewForward(docLocal As notesdocument)
  6292.      On Error Goto ErrorRoutine
  6293.      
  6294.      Dim url As Variant
  6295.      Dim webdoc As notesdocument
  6296.      Dim uid As notesuidocument
  6297.      Dim uid2 As notesuidocument
  6298.      Dim uid3 As notesuidocument
  6299.      
  6300.      url = docLocal.url
  6301.      Set webdoc = db.getdocumentbyurl(url(0))
  6302.      
  6303.      webdoc.forward="1"
  6304.      webdoc.save True, False
  6305.      Print "Webdoc is saved"
  6306.      w.viewrefresh
  6307.      w.viewrefresh
  6308.      Set uid = w.editdocument(False, webdoc)   
  6309.      Set uid2=w.currentdocument
  6310.      uid2.forward
  6311.      Set uid3 = w.currentdocument
  6312.      uid.close     
  6313.      webdoc.removeitem "Forward"
  6314.      webdoc.save True, False
  6315.      Exit Sub
  6316.      
  6317. ErrorRoutine:
  6318.      Messagebox Error & " (ViewForward)"
  6319.      Exit Sub
  6320. End Sub
  6321. '++LotusScript Development Environment:2:1:DuplicateBookmark:1:8
  6322. Function DuplicateBookmark(szURL) As Integer
  6323.      Dim bookmarkcollection As notesdocumentcollection
  6324.      Dim currentbookmark As notesdocument
  6325.      Dim dt As New NotesDateTime("1/1/90")
  6326.      DuplicateBookmark = False
  6327.      Set bookmarkcollection = db.search("bookmark=""1""",dt, 0)
  6328.      If bookmarkcollection.count <>0 Then
  6329.           For j = 1 To bookmarkcollection.count 
  6330.                Set currentbookmark = bookmarkcollection.getnthdocument(j)
  6331.                If currentbookmark.url(0) = szURL Then 
  6332.                     DuplicateBookmark = True
  6333.                     Exit For
  6334.                End If
  6335.           Next
  6336.      End If
  6337. End Function
  6338. '++LotusScript Development Environment:2:2:CheckRegistrySettings:1:8
  6339. Sub CheckRegistrySettings
  6340.      'sync Internet Options form
  6341.      Dim lpSubKey1 As String
  6342.      Dim IESearchURL As String
  6343.      Dim IEHomePageURL As String
  6344.      Dim NotesSearchURL As Variant
  6345.      Dim NotesHomePage As Variant
  6346.      Dim CompareResult As String
  6347.      
  6348.      If docProfile Is Nothing Then GetProfiledocument
  6349.      
  6350.      'Obtain values from the registry
  6351.      lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  6352.      IESearchURL =  GetRegValue(lpsubkey1, "Search Page" )
  6353.      IEHomePageURL = GetRegValue(lpsubkey1, "Start Page")
  6354.      
  6355.      'Obtain Notes values
  6356.      NotesSearchURL = docprofile.SearchURL
  6357.      NotesHomePage = docprofile.OpenURL
  6358.      
  6359.      'Compare Search URL values 
  6360.      
  6361.      CompareResult = CompareValues(IESearchURL, NotesSearchURL(0))
  6362.      
  6363.      Select Case CompareResult
  6364.      Case "SetRegistry"
  6365.           'Put the Notes Value in the W32 Registry
  6366.           Call SetRegValue(lpSubKey1, "Search Page", NotesSearchURL(0))
  6367.      Case "SetNotes"
  6368.           'Put the W32 Registry value in Notes
  6369.           docprofile.SearchURL = IESearchURL
  6370.           Call docprofile.save(True, False)
  6371.           
  6372.      End Select
  6373.      
  6374.      'Compare Home Page Values only if load home page on open is selected.
  6375.      
  6376.      CompareResult = CompareValues(IEHomePageURL, NotesHomePage(0))
  6377.      
  6378.      Select Case CompareResult
  6379.      Case "SetRegistry"
  6380.           'Put the Notes Value in the W32 Registry
  6381.           Call SetRegValue(lpSubKey1, "Start Page", NotesHomePage(0))
  6382.      Case "SetNotes"
  6383.           docprofile.OpenUrl = IEHomePageURL
  6384.           Call docprofile.save(True, False)
  6385.      End Select
  6386.      
  6387.      
  6388. End Sub
  6389. '++LotusScript Development Environment:2:1:CompareValues:1:8
  6390. Function CompareValues(IEValue As String, NotesValue As Variant) As String
  6391.      If IEValue = NotesValue Then
  6392.           'The values are the same, don't do anything
  6393.           ComapreValues = "0"
  6394.           Exit Function
  6395.      Elseif IEValue ="" And NotesValue <> "" Then
  6396.           CompareValues = "SetRegistry"
  6397.           Exit Function
  6398.      Elseif IEValue <>"" And NotesValue = "" Then
  6399.           CompareValues = "SetNotes"
  6400.           Exit Function
  6401.      Elseif IEValue <> "" And NotesValue <> "" Then
  6402.           CompareValues = "DoNothing"
  6403.           Exit Function
  6404.      End If
  6405. End Function
  6406. '++LotusScript Development Environment:2:1:ParseFilename:1:8
  6407. Function ParseFilename(szPath As String) As String
  6408.      'This routine pulls the filename out of a path filename combination string.
  6409.      'This is a W32 and OS2 only function
  6410.      
  6411.      Dim strlength As Integer
  6412.      Dim currpos As Integer
  6413.      strlength = Len(szPath)
  6414.      'Extract to first \
  6415.      currpos = Instr(1, szPath, "\")
  6416.      While currpos <> 0  
  6417.           'keep extracting \ until we can't find anymore
  6418.           oldpos = currpos
  6419.           currpos = Instr(currpos+1, szPath, "\")
  6420.      Wend
  6421.      parsefilename = Right$(szPath, (strlength - oldpos))
  6422. End Function
  6423. '++LotusScript Development Environment:2:2:NotesForwardNote:1:8
  6424. Sub NotesForwardNote(doc As notesdocument)
  6425.      On Error Goto ErrorRoutine
  6426.      On Error 4412 Goto nomailfile
  6427.      
  6428.      If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options")) Then   
  6429.           Select Case doc.ForwardOptions(0)
  6430.           Case "1" : 'user wants to forward the URL only
  6431.                Call CreateIELink(doc.url(0), doc.title(0))
  6432.           Case "2" : 'user wants to send entire page
  6433.                Dim uid As notesuidocument
  6434.                Dim uid2 As notesuidocument
  6435.                Dim uid3 As notesuidocument
  6436.                Print "Creating mail memo..."
  6437.                w.viewrefresh
  6438.                w.viewrefresh
  6439.                Set uid = w.editdocument(False, doc)   
  6440.                Set uid2=w.currentdocument
  6441.                uid2.forward
  6442.                Set uid3 = w.currentdocument
  6443.                uid.close     
  6444.                
  6445.           End Select
  6446.           'remove any remaining fields that don't need to be carried around
  6447.           doc.RemoveItem "ForwardOptions" 
  6448.           doc.save True, False
  6449.      End If
  6450.      Exit Sub
  6451.      
  6452. ErrorRoutine:
  6453.      Messagebox Error & " (NotesForwardNote)"
  6454.      Exit Sub
  6455.      
  6456. NoMailFile:
  6457.      uid.close
  6458.      Exit Sub
  6459.      
  6460. End Sub
  6461. '++LotusScript Development Environment:2:1:ParseURL:1:8
  6462. Function ParseURL(url As String) As String
  6463.      'This routine returns the type of URL that is being evaluated
  6464.      'first pull out the protocol
  6465.      
  6466.      ParseURL = Left$(url, Len(url) - Instr(url, "://"))
  6467. End Function
  6468. <5dDdDdDD8D8
  6469. Cx8x8
  6470. 5x5x5
  6471. @9p9@9@9p9p9
  6472. \:\:D
  6473. t=T=T=d=d=
  6474. D=D=@
  6475. >l>l>
  6476. >(>(>
  6477. h?X?X?
  6478. \A\A<A<A
  6479. C|C|C
  6480.  F FPFPF`F`F0F0F
  6481. 0G0G@GPG
  6482. `G`GpGpG
  6483. = 8 8
  6484. L%|%<    
  6485. ((((d
  6486. H(h)x
  6487. H)H)<
  6488. (*(*4
  6489. H+H,(
  6490. h+(-@
  6491. `1`14
  6492. ,?L-4
  6493. PGPG<:
  6494. 2-$3#
  6495. ^@2K,#-H3#
  6496. 1K@2,l3}
  6497. [,#+l"$
  6498. #+<#$
  6499. #-<4#
  6500. $,`4}
  6501. 4K,$S
  6502. 4K,$S
  6503. 4K,$Sl5
  6504. K,$Sx7
  6505. K,$Sx7
  6506. K,$Sx7
  6507. K,$Sx7
  6508. #- 8#
  6509. 7Q 7I 
  6510. ,x8},!#
  6511. ,x8}H!#
  6512. ,x8}`!#
  6513. ,x8},!#
  6514. ,x8}H!#
  6515. ,x8}`!#
  6516. $,`4}
  6517. [|%}l$
  6518. $G<$#8^
  6519. [<%K<$S$9
  6520. [<%G<%}4%
  6521. %G<%~8,
  6522. %G<%G
  6523. J@9~8,
  6524. ^P9JP9
  6525. ^p9G<%J`9
  6526. ^@9Jp9G
  6527. J@9~8,
  6528. [\%GL%
  6529. 9)T [<%#
  6530. KL$Q 7J
  6531. KL$Q 7G
  6532. KL$,D8
  6533. 9G|%#
  6534. GL%}8&
  6535. [|%}@&
  6536. &G<$#8^
  6537. [<%K<$S$9
  6538. [\%GL%
  6539. GL%} '
  6540. [l%GL%
  6541. G|%}4%
  6542. G|%}4%
  6543. [|%G|%
  6544. GL%}\'
  6545. GL%}h'
  6546. GL%}x'
  6547. ^l:J\:
  6548. [|%G|%}4%
  6549. Jl:J\:
  6550. KL$Q 7Gl%
  6551. KL$,D8
  6552. 9G|%#
  6553. :-$3#
  6554. :-$3#
  6555. ^l;4K
  6556. :K,#,
  6557. :,@;#
  6558. ;+l"$
  6559. ;+<#$
  6560. ;,L<}
  6561. ;,L<}
  6562. ;,L<}
  6563. ;,L<}
  6564. ;,L<K
  6565. ;,L<K
  6566. ;,L<}
  6567. ;,L<}
  6568. ;,L<}
  6569. ;,L<}
  6570. ;,L<}
  6571. ;,L<}
  6572. Jt=}\*
  6573. Kl>,D8
  6574. ^|>K,#,
  6575. >K,#-H3#
  6576. >K,#-H3#
  6577. K|>,@;#
  6578. Kl>,x8}
  6579. Kl>,D8
  6580. ,x8}$.#
  6581. K|>,@;#
  6582. Kh?,x?#
  6583. ?Kh?-
  6584. ?#Kh?-
  6585. ^H?K,#-H3#
  6586. ^X?KH?-$@#
  6587. KH?,H@}
  6588. KH?,H@}
  6589. @+<#$
  6590. @-<4#
  6591. @#-$3#
  6592. 1[`1#
  6593. A[p1#
  6594. ^lAJ\A
  6595. J\A}\*
  6596. ^|AJlA
  6597. JlA}\*
  6598. ^LAK<A,
  6599. <J|A#
  6600. KL$Q 7N
  6601. KL$,D8
  6602. ^TCrTC
  6603. K,$,D8
  6604. D-$3#
  6605. D-$3#
  6606. C-@D#8L
  6607. C-dD#
  6608. E}07J
  6609. D-$3#
  6610. %K,$S
  6611. A}|7}
  6612. %K,$S
  6613. ^ FK,
  6614. K0F,D8
  6615. ^@FK,#,
  6616. ^PFK,#-H3#
  6617. ^`FK,#-H3#
  6618. K@F,@;#
  6619. K0F,x8}
  6620. K0F,D8
  6621. E}P8J
  6622. KpF-$3#
  6623. KpF-$3#
  6624. FKpF,
  6625. FK,$Pl5
  6626. GK,$P
  6627. K,$Ql5J
  6628. K,$,D8
  6629. K,$,D8
  6630. I4 ID 
  6631. GK,#,
  6632. GK,#-H3#
  6633. GK,#-H3#
  6634. G,@;#
  6635. !,x8}$.#
  6636. G,@;#
  6637. ]L"I\"
  6638. O=Lotus Notes
  6639. O=Lotus Notes
  6640. PURSAFO
  6641. |.:#U
  6642. O=Lotus Notes
  6643. CN=Lotus Notes Template Development/O=Lotus Notes
  6644. PURSAFO
  6645. Fde!f^^
  6646. $ScriptLib
  6647. $ScriptLib_O
  6648. $TITLE
  6649. $Flags
  6650. $PublicAccess
  6651. Script Developme
  6652. ed$UpdatedBy$ACLDigest$Signature$DesignVersion$Version$Formula$FormulaClass$Collation$TITLE$INFO$FlagsURLDoclink$FIELDS$BODY$Fonts$TemplateModTime$TemplateServerName$TemplateFileName$DefaultNavigator$FlagsNoRefreshIconBitmap$SCRIPTOBJ_12$SCRIPTOBJ_11$Index$Collation1$Collation2$Collation3$VIEWFORMAT$FormFormula$Comment$ACTIONS$SCRIPTOBJ_6$SCRIPTOBJ_7$SCRIPTOBJ_8$SCRIPTOBJ_9$SCRIPTOBJ_10$ViewGlobalScript$ViewGlobalScript_O$ViewScript$ViewScript_O$WINDOWTITLE$Script$$Script_O$$ScriptName$$FormScript$$$FormScript_O$$StartUpOptions$StartUpOptions_O$$OpenURL$OpenURL_O$$ScanAhead$ScanAhead_O$$PreferredSearchEngine$PreferredSearchEngine_O$$$Script1$$Script1_OStartUpOptionsOpenURLReduceNumDaysReduceNumMBWebDatabaseAnchor_styleBodyFixedPlainAddressListingSearchFrequencyUpdatesFoundOptionsSendMailToScanAheadPreferredSearchEngineSearchURLReduceDaysReduceSizeSaveHTMLWebServerKeepPage$Script1$Collation4$Totals$DBScript$DBScript_O$PublicAccessTitleURLContentCommentsSharedOptionstmpWebServertmpWebDbRatingbookmarkfileCounter$Hotspot0_OCreatedExpirationPrivacy_flagsOriginal_DateLast_Modified$$XMB_2$$XMB_3$SCRIPTOBJ_21$SCRIPTOBJ_20HTTPStatusTypeHostFileNameSaveOptionsSubject$SCRIPTOBJ_3$SCRIPTOBJ_5$SCRIPTOBJ_16$SCRIPTOBJ_17$SCRIPTOBJ_19$SCRIPTOBJ_18$Name$SCRIPTOBJ_0$SCRIPTOBJ_1$SCRIPTOBJ_2$SCRIPTOBJ_13$SCRIPTOBJ_14$SCRIPTOBJ_15$FolderObject$FolderIDTableForwardOptions$FILE$SCRIPTOBJ_26$OLEOBJINFO$OLEPreviewActivate$SCRIPTOBJ_4$SCRIPTOBJ_22$SCRIPTOBJ_23$SCRIPTOBJ_24$SCRIPTOBJ_25$$XMB$Licensee$AssistType$AssistLastRun$AssistDocCount$AssistFlags$AssistTrigger$AssistInfo$AssistQuery$AssistAction$AssistAction_Ex$AssistRunInfo$AssistVersionFORMbookmark$Revisions$ScriptLib$ScriptLib_O$Type$Operation$Scan$LeftToDo
  6653. '++LotusScript Development Environment:2:5:(Options):0:74
  6654. Use "AgentFunctions"
  6655. '++LotusScript Development Environment:2:5:(Forward):0:1
  6656. Declare Sub Initialize
  6657. Declare Function NeedToRun(Frequency As Variant) As Integer
  6658. Declare Sub MindURLs(Options As Variant)
  6659. Declare Function DocumentHasBeenRefreshed(CurrentUrl As Variant) As Integer
  6660. Declare Function AppendTitle(Title As String) As String
  6661. '++LotusScript Development Environment:2:5:(Declarations):0:10
  6662. Dim PageMinderFolder As notesview
  6663. Dim EmailAddress As Variant
  6664. Dim CurrentWebDocument As notesdocument
  6665. Dim PreviousWebdocument As notesdocument
  6666. Dim Memo As NotesDocument
  6667. Dim AgentDoc As notesdocument
  6668. Dim Frequency As Variant
  6669. Dim ResultOptions As Variant
  6670. Dim LastRun As Variant
  6671. Dim PageMinderAgent As NotesAgent
  6672. Dim NewWebDocument As notesdocument
  6673. Dim LoadURLLinks As Integer
  6674. '++LotusScript Development Environment:2:2:Initialize:1:10
  6675. Sub Initialize
  6676.      
  6677.      '*
  6678.      '*  The purpose of this agent is to monitor specific pages within the page minder folder and e-mail
  6679.      '*  either changed pages or a newsletter summary to the current user or whoever is listed
  6680.      '*  in the Internet Profile as the email address.
  6681.      '*  This agent makes extensive use of Agent Logging functions.  Please check your local copy of agentlog.nsf 
  6682.      '*  for status and error messages.
  6683.      '*
  6684.      
  6685.      '*
  6686.      '*  Initialize Variables
  6687.      '*
  6688.      On Error Goto ProcessError
  6689.      
  6690.      InstantiateAgentObjects
  6691.      Set dataDoc = Session.SavedData
  6692.      Set WebDatabase = Session.CurrentDatabase
  6693.      Set PageMinderAgent = Session.CurrentAgent
  6694.      Set dt = New NotesDateTime ("1/1/90")
  6695.      
  6696.      LoadURLLinks = False
  6697.      
  6698.      '*
  6699.      '*  Open/Create the Agent Error Log on the client.
  6700.      '*
  6701.      
  6702.      Set AgentLog = OpenLog(PageMinderAgent.name)
  6703.      
  6704.      If LogLocation = "Agent Log" Then
  6705.           agentLog.LogErrors = True     
  6706.      End If
  6707.      
  6708.      Call logaction( "Starting Page Minder agent.....")
  6709.      
  6710.      If (datadoc Is Nothing) Then
  6711.           Set datadoc = New Notesdocument (WebDatabase) 
  6712.      End If
  6713.      '*
  6714.      '*  Make sure that the location settings are correct for local retrievals
  6715.      '*
  6716.      
  6717.      If WebLocationOK Then
  6718.           
  6719.      '*
  6720.      '*  Make sure that the database variable was initialized.
  6721.      '*
  6722.           
  6723.           If  (WebDatabase Is Nothing) Then
  6724.                
  6725.                Call logerror( 1, "Web Database could not be initialized. Exiting Program without checking URL's.")
  6726.                Goto Cleanup
  6727.           End If
  6728.           
  6729.      '*
  6730.      '*  Verify that the Page Minder Folder exists in the database.
  6731.      '*  If not, exit the program.
  6732.      '*
  6733.           
  6734.           Set PageMinderFolder = WebDatabase.getview("Web Bots\Page Minder")
  6735.           
  6736.           If (PageMinderFolder Is Nothing) Then
  6737.                Call logerror(2, "Could not find Page Minder Folder.  Please recheck database design and rerun.")
  6738.                Goto Cleanup
  6739.           End If
  6740.           
  6741.      '*
  6742.      '*  Now that the Page Minder Folder exists, check to see if there are any documents
  6743.      '*  in it.  If not, exit the program.
  6744.      '*
  6745.           Set CurrentWebDocument = PageMinderFolder.GetFirstDocument
  6746.           
  6747.           If (CurrentWebDocument Is Nothing) Then
  6748.                Call logaction( "No documents were found to mind in the Page Minder Folder." )
  6749.                Goto Cleanup
  6750.           End If
  6751.           
  6752.      '*
  6753.      '*  Now that we have verified that there are documents to be checked,
  6754.      '*  we need to retrieve the pertinent fields from the Internet Profile.
  6755.      '*
  6756.           
  6757.           
  6758.           If  ( View Is Nothing ) Then
  6759.                Call logerror(3, "Could not find Internet Profile view.  Recheck database design and rerun agent.")
  6760.                Goto Cleanup
  6761.           End If
  6762.           
  6763.      '*
  6764.      '*  Make sure that an Internet profile document exists in the database.
  6765.      '*  If not, exit the program.
  6766.      '*
  6767.           
  6768.           If (docProfile Is Nothing) Then
  6769.                Call logerror(4, "Internet Options document not found.  Select Actions - Internet Options and Save the document.")
  6770.                Goto Cleanup
  6771.           End If
  6772.           
  6773.      '*
  6774.      '*  Retrieve the frequency with which we should run the agent.
  6775.      '*  If this is blank, assume daily.
  6776.      '*
  6777.           
  6778.           Frequency = docProfile.SearchFrequency
  6779.           If Frequency(0) = "" Then
  6780.                Call logaction( "No frequency specified, assuming daily.")
  6781.                Call docProfile.Replaceitemvalue("SearchFrequency", "2")
  6782.                Call docProfile.Save(True,False)
  6783.                Frequency = docProfile.SearchFrequency
  6784.           End If
  6785.           
  6786.      '*
  6787.      '*  Retrieve the SendMailTo field to determine where we send
  6788.      '*  results to.  If this is blank, sub in the current username.
  6789.      '*
  6790.           EmailAddress = docProfile.SendMailto
  6791.           If EmailAddress(0) = "" Then
  6792.                Call logaction( "No address specified to send results to.  Assuming " + session.username)
  6793.                Call docProfile.Replaceitemvalue("SendMailto", Session.Username)
  6794.                Call docProfile.Save(True,False)
  6795.                EmailAddress = docProfile.SendMailto
  6796.           End If
  6797.           
  6798.      '*
  6799.      '*  Retrieve the value of the UpdatesFoundOptions field
  6800.      '*  to determine what it is that we should do with the results 
  6801.      '*  of the Pages that have changed.  If it's blank, assume 
  6802.      '*  newsletter summary.
  6803.      '*
  6804.           ResultOptions = docProfile.UpdatesFoundOptions
  6805.           If ResultOptions(0) = "" Then
  6806.                Call logaction( "No format for results specified. Assuming newsletter summary." )
  6807.                Call docProfile.Replaceitemvalue("UpdatesFoundOptions", "1")
  6808.                Call docProfile.Save(True,False)
  6809.                ResultOptions = docProfile.UpdatesFoundOptions
  6810.           End If
  6811.           
  6812.      '*
  6813.      '*  Now determine if we have to check the pages based on the last time this
  6814.      '*  agent is run.  
  6815.      '*
  6816.           
  6817.           If PageMinderAgent.LastRun <> "" Then
  6818.                If (NeedToRun (Frequency)) Then
  6819.                     Call logaction( "Frequency indicates that we need to check the urls.")
  6820.                     MindURLs(ResultOptions(0))
  6821.                End If
  6822.           Else
  6823.                'This must be the first time we've run this so we don't need to check when it was last run.
  6824.                MindURLs(ResultOptions(0))
  6825.           End If
  6826.           
  6827.      End If
  6828.      Goto cleanup  
  6829. ProcessError:
  6830.      Call logerror(Err, Error$)
  6831.      Call logaction("The preceeding error occurred in the Initialize routine of the Purge Agent.")
  6832.      Resume Next     
  6833. Cleanup:  'Cleanup all the old memo forms created by the agent
  6834.      Set documents = db.search("form = ""Memo""", dt, 0)
  6835.      If documents.count<>0 Then
  6836.           For j = 1 To documents.count
  6837.                Set memo = documents.getnthdocument(j)
  6838.                memo.remove True
  6839.           Next
  6840.      End If
  6841.      Call logaction("Page Minder Agent finished."     )
  6842.      If LogLocation = "Agent Log" Then
  6843.           Call agentlog.close
  6844.      End If
  6845. End Sub
  6846. '++LotusScript Development Environment:2:1:NeedToRun:1:8
  6847. Function NeedToRun(Frequency As Variant) As Integer
  6848.      
  6849.      '*
  6850.      '*  This function determines if we need to run the agent
  6851.      '*  based on the frequency selection in the Internet Profile
  6852.      '*  The function returns a value of true or false depending on when the agent
  6853.      '*  was last run.
  6854.      '*
  6855.      
  6856.      On Error Goto ProcessError     
  6857.      Dim CurrentTime As New  NotesDatetime ("Now")
  6858.      Dim LastRunDate As New NotesDateTime(datadoc.LastRunTime(0))
  6859.      Dim Starttime As New NotesDateTime("1/1/70")
  6860.      NeedToRun = False
  6861.      Call CurrentTime.Setnow
  6862.      If LastRunDate.lslocaltime < Starttime.lslocaltime Then
  6863.           NeedToRun = True
  6864.           Exit Function
  6865.      End If
  6866.      
  6867.      Select Case Frequency(0) 
  6868.           
  6869.      Case  "0"
  6870.           
  6871.           If CurrentTime.timedifference(LastRunDate) > 3600  Or  Isempty(LastRunDate.LocalTime) Then
  6872.                Call logaction( "It's been more than an hour, time to mind the URL's")
  6873.                NeedToRun = True
  6874.           End If
  6875.      Case "1"
  6876.           If CurrentTime.timedifference(LastRunDate) >14400 Or  Isempty(LastRunDate.LocalTime)  Then
  6877.                Call logaction( "It's been more than 4 hours, time to mind the URL's")
  6878.                NeedToRun = True
  6879.           End If
  6880.      Case "2"
  6881.           If CurrentTime.timedifference(LastRunDate) >86400 Or  Isempty(LastRunDate.LocalTime)   Then
  6882.                Call logaction( "It's been more than a day, time to mind the URL's")
  6883.                NeedToRun = True
  6884.           End If
  6885.      Case  "3"
  6886.           If CurrentTime.timedifference(LastRunDate) > 604800 Or  Isempty(LastRunDate.LocalTime)  Then
  6887.                Call logaction( "It's been more than a week, time to mind the URL's")
  6888.                NeedToRun = True
  6889.           End If
  6890.      End Select
  6891.      Exit Function
  6892.      
  6893. ProcessError:
  6894.      Call logerror(Err, Error$)
  6895.      Call logaction("The preceeding error occurred in the NeedToRun routine of the Page Minder Agent.")
  6896.      Resume Next 
  6897.      
  6898. End Function
  6899. '++LotusScript Development Environment:2:2:MindURLs:1:8
  6900. Sub MindURLs(Options As Variant)
  6901.      
  6902.      '*
  6903.      '*  This subroutine performs the test on each document in the page minder
  6904.      '*  folder to see if the document has changed.  If it has, it sends the requested form
  6905.      '*  of e-mail to the user specified in the Internet options.
  6906.      '*
  6907.      On Error Goto ProcessError
  6908.      
  6909.      Dim url As Variant
  6910.      Dim Memo As NotesDocument
  6911.      Dim Memo1 As NotesDocument
  6912.      Dim Body As NotesrichTextItem
  6913.      Dim Body1 As NotesrichTextItem
  6914.      Dim Body2 As NotesrichTextItem
  6915.      Dim background As notesitem
  6916.      Dim papercolor As notesitem
  6917.      Dim SendMail As Integer
  6918.      Dim FirstTime As Integer
  6919.      Dim Successful As Integer
  6920.      
  6921.      If Options = "1" Then
  6922.           Set Memo = New NotesDocument(WebDatabase)
  6923.           Set Body = New NotesRichTextItem(Memo, "Body")
  6924.           Set Body1 = New NotesRichTextItem(Memo, "Body1")
  6925.           Set Body2 = New NotesRichTextItem(Memo, "Body2")
  6926.           Call Memo.ReplaceItemValue( "Subject", "Results of Page Minder Agent for "+ WebDatabase.Filename )
  6927.           Call Memo.ReplaceItemValue( "Form", "Memo" )
  6928.           Call Memo.Save(True,False)
  6929.           SendMail = False
  6930.           FirstTime = True
  6931.           Successful = True
  6932.      Elseif Options = "0" Then
  6933.           Sendmail = False
  6934.           FirstTime = True
  6935.      End If
  6936.      
  6937.      While Not (CurrentWebDocument Is Nothing) 
  6938.           If CurrentWebdocument.form(0) = "HelpForm"  Then Goto nextdocument
  6939.           If CurrentWebDocument.hasitem("url") Then
  6940.                url = CurrentWebDocument.url(0)
  6941.                
  6942.                If url = "" Then
  6943.                     Call logerror(7,  "URL field is empty.  Remove the page from the Page Minder Folder.")
  6944.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  6945.                     Call CurrentWebDocument.Save(True, False)
  6946.                     Goto NextDocument
  6947.                End If
  6948.                
  6949.                If (CurrentWebDocument.HTTPStatus(0) <> "200") Or (CurrentWebDocument.HTTPStatus(0) <> "304") Then
  6950.                     Goto Continue  
  6951.                End If
  6952.                
  6953.                If CurrentWebDocument.HTTPLast_Modified(0) = "" Then
  6954. NoLastModified:
  6955.                     If Options = "1"  And FirstTime Then
  6956.                          Call Body1.AddNewLine(1)
  6957.                          Call Body1.AppendText("The following pages are on HTTP servers which do not support the Last-Modified command:")
  6958.                          Call Body1.AddNewLine(2)
  6959.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  6960.                          Call Body1.AddTab(2)
  6961.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  6962.                          Call Body1.AddNewLine(1)
  6963.                          Call Memo.Save(True, False)
  6964.                          FirstTime = False
  6965.                          SendMail = True
  6966.                     Elseif Options = "1" Then
  6967.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  6968.                          Call Body1.AddTab(2)
  6969.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  6970.                          Call Body1.AddNewLine(1)
  6971.                          Call Memo.Save(True, False)
  6972.                          SendMail = True
  6973.                     Elseif Options = "0" And FirstTime Then
  6974.                          Set Memo1 = New NotesDocument(WebDatabase)
  6975.                          Set Body1 = New NotesRichTextItem(Memo1, "Body")  
  6976.                          Call Memo1.ReplaceItemValue( "Subject", "Results of Page Minder Agent for "+WebDatabase.Filename  )
  6977.                          Call Memo1.ReplaceItemValue( "Form", "Memo" )
  6978.                          Call Body1.AppendText("The following pages are on HTTP servers which do not support the Last-Modified command:")
  6979.                          Call Body1.AddNewLine(2)
  6980.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  6981.                          Call Body1.AddTab(2)
  6982.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  6983.                          Call Body1.AddNewLine(1)
  6984.                          Call Memo1.Save(True, False)
  6985.                          FirstTime = False
  6986.                          SendMail = True
  6987.                     Elseif Options = "0" Then
  6988.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  6989.                          Call Body1.AddTab(2)
  6990.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  6991.                          Call Body1.AddNewLine(1)
  6992.                          Call Memo1.Save(True, False)
  6993.                          SendMail = True
  6994.                     End If
  6995.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "1")
  6996.                     Call CurrentWebDocument.Save(True, False)
  6997.                     Goto NextDocument
  6998.                End If
  6999.                
  7000. Continue:
  7001.                Set NewWebDocument = RetrieveOverInternet(url,CurrentWebDocument,LoadURLLinks) 
  7002.                If NewWebDocument.HTTPStatus(0) = "401" Then Goto AuthenticationFailed
  7003.                If NewWebDocument.HTTPLast_Modified(0) = "" Then  Goto NoLastModified    
  7004.                If  DocumentHasBeenRefreshed(url) Then
  7005.                     If (NewWebDocument.HTTPStatus(0) = "200") Or (NewWebdocument.HTTPStatus(0) = "304")  Then
  7006.                          Call agentlog.logaction( "Successfully retrieved " +NewWebDocument.URL(0)+" page")
  7007.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "0")
  7008.                          Call NewWebdocument.Save(True,False)
  7009.                          Call NewWebdocument.PutInFolder("Web Bots\Page Minder")
  7010.                          
  7011.                          If Options = "0" Then
  7012.                               Set Memo = New NotesDocument(WebDatabase)
  7013.                               Call Memo.ReplaceItemValue( "Subject", "Results of Page Minder Agent for " + NewWebDocument.url(0)+ " in the file "+WebDatabase.Filename)
  7014.                               Call Memo.Replaceitemvalue("Form", "Memo")
  7015.                               If NewWebdocument.hasitem("$Background") Then
  7016.                                    Set background = NewWebdocument.getfirstitem("$Background")
  7017.                                    Call memo.copyitem(background, "$Background")
  7018.                               End If
  7019.                               If NewWebdocument.hasitem("$PaperColor") Then
  7020.                                    Set papercolor = NewWebdocument.getfirstitem("$PaperColor")
  7021.                                    Call memo.copyitem(papercolor, "$PaperColor")
  7022.                               End If
  7023.                               Set Body = New NotesRichTextItem(Memo, "Body")  
  7024.                               Call NewWebDocument.Rendertortitem(Body)
  7025.                               Call Memo.save(True,False)
  7026.                               Call Memo.send(False, EmailAddress(0))
  7027.                          Elseif Options ="1" And Successful Then
  7028.                               Call Body2.AddNewLine(1)
  7029.                               Call Body2.AppendText("The following pages have changed as of "+Cstr(Today)+":")   
  7030.                               Call Body2.AddNewLine(2)
  7031.                               Call Body2.AppendText(AppendTitle(NewWebDocument.Title(0)))
  7032.                               Call Body2.AddTab(2)
  7033.                               Call Body2.AppendText(NewWebDocument.url(0))
  7034.                               Call Body2.AddNewLine(1)
  7035.                               Call Memo.Save(True, False)
  7036.                               Successful = False
  7037.                               SendMail = True
  7038.                          Elseif Options = "1" Then
  7039.                               Call Body2.AppendText(AppendTitle(NewWebDocument.Title(0)))
  7040.                               Call Body2.AddTab(2)
  7041.                               Call Body2.AppendText(NewWebDocument.url(0))
  7042.                               Call Body2.AddNewLine(1)
  7043.                               Call Memo.Save (True, False)
  7044.                               SendMail = True
  7045.                          End If
  7046.                     Elseif NewWebDocument.HTTPStatus(0) = "401" Then
  7047. AuthenticationFailed:
  7048.                          Call logerror(8,"Page Minder does not have required authentication information for "+NewWebDocument.url(0)+".  Page was not retrieved correctly.")
  7049.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7050.                          Call NewWebDocument.Save(True, False)
  7051.                          Call NewWebdocument.removefromfolder("Web Bots\Page Minder")
  7052.                          If GetLocationItem("WebRetriever")(0) <> "3" Then
  7053.                               Dim AuthenticationMemo As New Notesdocument(WebDatabase)
  7054.                               Set Body = New NotesRichTextItem(AuthenticationMemo, "Body")
  7055.                               Call AuthenticationMemo.ReplaceItemValue( "Subject", "Page Minder Requires Authentication Information ")
  7056.                               Call AuthenticationMemo.ReplaceItemValue( "Form", "Memo" )
  7057.                               Call Body.AddNewLine(1)
  7058.                               Call Body.Appendtext("The following page requires authentication information.  Please retreive the page manually and move it to the Page Minder folder again.")
  7059.                               Call Body.AddNewLine(2)
  7060.                               Call Body.AppendDocLink(NewWebDocument, NewWebDocument.url(0))
  7061.                               Call Body.AddTab(2)
  7062.                               Call Body.AppendText(NewWebDocument.Title(0))
  7063.                               Call Body.AddNewLine(1)
  7064.                               Call AuthenticationMemo.Save (True, False)
  7065.                               Call AuthenticationMemo.send(False, EmailAddress(0))
  7066.                          Else
  7067.                               Call agentlog.Logaction("Page Minder does not support authenticated pages when using the Notes with Internet Explorer setting.")
  7068.                          End If
  7069.                     Else
  7070.                          Call logerror(9, "Page Minder received a bad status code of " + Cstr(NewWebDocument.HttpStatus(0)) +".  Page " + Cstr(NewWebDocument.url(0))+" was not retrieved correctly.")
  7071.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7072.                          Call NewWebDocument.Save(True, False)
  7073.                     End If
  7074.                Else
  7075.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "3")
  7076.                     Call CurrentWebDocument.Save(True, False)
  7077.                End If
  7078.           Else
  7079.                Call logerror(7, "URL field is not present on the note.  Remove from Page Minder Folder.")
  7080.                Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7081.                Call CurrentWebDocument.Save(True, False)
  7082.           End If      
  7083. NextDocument:
  7084.           
  7085.           Set CurrentWebDocument=PageMinderFolder.GetNextDocument(CurrentWebDocument)
  7086.           
  7087.      Wend
  7088.      
  7089.      If SendMail Then
  7090.      '*
  7091.      '* Now that we're done checking the pages, if the user
  7092.      '* requested a newsletter summary of the results, let's mail it.
  7093.      '*
  7094.           If Options = "1" Then
  7095.                Set Body = New NotesRichTextItem(Memo, "Body")  
  7096.                If Body2.Type = RICHTEXT Then
  7097.                     Call Body.Appendrtitem(Body2)
  7098.                End If
  7099.                If Not (Body1 Is Nothing) Then
  7100.                     If Body1.Type = RICHTEXT Then
  7101.                          Call Body.Appendrtitem( Body1)
  7102.                     End If
  7103.                End If
  7104.                Call Memo.Save(True, False)
  7105.                Call Memo.Send(False, EmailAddress(0))
  7106.           Elseif Options = "0" And Not (Memo1 Is Nothing) Then
  7107.                If Body1.Type  =  RICHTEXT Then
  7108.                     Call Memo1.send(False,EmailAddress(0))
  7109.                End If
  7110.           End If
  7111.      End If
  7112.      Goto EndSub
  7113.      
  7114. ProcessError:
  7115.      Call logerror(Err, Error$)
  7116.      Call logaction("The preceeding error occurred in the MindURLs routine of the Page Minder agent.")
  7117.      Resume Next     
  7118. EndSub:
  7119.      Call datadoc.Replaceitemvalue("LastRunTime", Now)
  7120.      Call datadoc.Save(True,False)
  7121. End Sub
  7122. '++LotusScript Development Environment:2:1:DocumentHasBeenRefreshed:1:8
  7123. Function DocumentHasBeenRefreshed(CurrentUrl As Variant) As Integer
  7124.      
  7125.      '*
  7126.      '*  The purpose of this function is to determine if the web page
  7127.      '*  that we are monitoring has changed.  If it has, the function
  7128.      '*  returns true.
  7129.      '*
  7130.      Dim LastRunDate As New NotesDateTime(datadoc.LastRunTime(0))
  7131.      DocumentHasBeenRefreshed = False     
  7132.      
  7133.      '*
  7134.      '*  Get the date that the document was last refreshed and
  7135.      '*  save it for future comparisons.
  7136.      '*
  7137.      
  7138.      
  7139.      Dim DateLastModified As New NotesDateTime(NewWebDocument.HTTPLast_modified(0))
  7140.      If (DebugFlag = "1") Then
  7141.           Call logaction( "Date Last Modified (GMT): " + Cdat(DateLastModified.LSGMTTime))
  7142.      End If
  7143.      
  7144.      
  7145.      
  7146.      If Cdat(DateLastModified.LSGMTTime) > Cdat(LastRunDate.LSGMTTime) Or Isempty(LastRunDate.LocalTime) Then
  7147.           DocumentHasBeenRefreshed = True
  7148.      End If
  7149.      
  7150.      
  7151. End Function
  7152. '++LotusScript Development Environment:2:1:AppendTitle:1:8
  7153. Function AppendTitle(Title As String) As String
  7154.      Dim titlelength As Integer
  7155.      titlelength = Len(title)
  7156.      If titlelength<40 Then
  7157.           NewTitle = "                                        "
  7158.           Lset NewTitle = title
  7159.           AppendTitle = NewTitle
  7160.      Elseif titlelength >40 Then
  7161.           AppendTitle = Left$(title, 40)
  7162.      End If
  7163. End Function
  7164. O=Lotus Notes
  7165. O=Lotus Notes
  7166. PURSAFO
  7167. |.:#U
  7168. O=Lotus Notes
  7169. CN=Lotus Notes Template Development/O=Lotus Notes
  7170. PURSAFO
  7171. Fde!f^^
  7172. $TITLE
  7173. $AssistType
  7174. $AssistLastRun
  7175. $AssistDocCount
  7176. $AssistFlags
  7177. $AssistTrigger
  7178. $AssistInfo
  7179. $AssistQuery
  7180. $AssistAction
  7181. $AssistAction_Ex
  7182. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesAgentFunctionss34Q1################################
  7183. ##########################################################
  7184. ##########################################################
  7185. ##########################################################
  7186. ##########################################################
  7187. ##########################################################
  7188. ##########################################################
  7189. ##########################################################
  7190. ##########################################################
  7191. ##########################################################
  7192. ##########################################################
  7193. ##########################################################
  7194. ##########################################################
  7195. ##########################################################
  7196. ##########################################################
  7197. ##########################################################
  7198. ##########################################################
  7199. ##########################################################
  7200. ##########################################################
  7201. ##########################################################
  7202. ##########################################################
  7203. ##########################################################
  7204. ##########################################################
  7205. ##########################################################
  7206. ##########################################################
  7207. ##########################################################
  7208. ##########################################################
  7209. ##########################################################
  7210. ##########################################################
  7211. ##########################################################
  7212. ##########################################################
  7213. ##########################################################
  7214. ##########################################################
  7215. ##########################################################
  7216. ##########################################################
  7217. ##########################################################
  7218. ##########################################################
  7219. ##########################################################
  7220. ##########################################################
  7221. ##########################################################
  7222. ##########################################################
  7223. ##########################################################
  7224. ##########################################################
  7225. ##########################################################
  7226. ##########################################################
  7227. ##########################################################
  7228. ##########################################################
  7229. ##########################################################
  7230. ##########################################################
  7231. ##########################################################
  7232. ##########################################################
  7233. ##########################################################
  7234. ##########################################################
  7235. ##########################################################
  7236. ##########################################################
  7237. ##########################################################
  7238. ##########################################################
  7239. ##########################################################
  7240. ##########################################################
  7241. ##########################################################
  7242. '++LotusScript Development Environment:2:5:(Options):0:74
  7243. Option Public
  7244. '++LotusScript Development Environment:2:5:(Forward):0:1
  7245. Declare Sub InstantiateAgentObjects
  7246. Declare Function OpenLog(AgentName As String) As NotesLog
  7247. Declare Function RetrieveOverInternet (CurrentURL As Variant, Doc As Notesdocument,  LoadURLLinks) As Notesdocument
  7248. Declare Function WebLocationOK As Integer
  7249. Declare Function GetLocalNAB() As NotesDatabase
  7250. Declare Sub Terminate
  7251. Declare Sub RemoveObjects(doc As notesdocument)
  7252. Declare Sub LogAction (Action As String)
  7253. Declare Sub LogError (ErrorCode As Long, ErrorText As String)
  7254. Declare Function GetLocationItem (itemname As String) As Variant
  7255. '++LotusScript Development Environment:2:5:(Declarations):0:10
  7256. Dim Session As notessession
  7257. Dim  DebugFlag As String
  7258. Dim agentlog As noteslog
  7259. Dim CurrentAgent As NotesAgent
  7260. Dim WebDatabase As NotesDatabase
  7261. Dim datadoc As notesdocument
  7262. Dim db As notesdatabase
  7263. Dim view As notesview
  7264. Dim docprofile As notesdocument
  7265. Dim loglocation As String
  7266. Dim dt As notesdatetime
  7267. '++LotusScript Development Environment:2:2:InstantiateAgentObjects:1:8
  7268. Sub InstantiateAgentObjects
  7269.      Set session = New NotesSession
  7270.      Set db = session.CurrentDatabase
  7271.      Set view = db.GetView("(Internet Profile)")
  7272.      Set docProfile = view.GetFirstDocument
  7273. End Sub
  7274. '++LotusScript Development Environment:2:1:OpenLog:1:8
  7275. Function OpenLog(AgentName As String) As NotesLog
  7276.      
  7277.      '*
  7278.      '*  The purpose of this subroutine is to find and/or create the Notes Agent Log
  7279.      '*  for the local client using the StdR4AgentLog template.
  7280.      '*
  7281.      
  7282.      Dim directory As notesdbdirectory
  7283.      Dim db As notesdatabase
  7284.      Dim done As Variant
  7285.      
  7286.      On Error Goto errorroutine
  7287.      
  7288.      Set directory = New notesdbdirectory("")
  7289.      Set db = directory.getfirstdatabase(DATABASE)
  7290.      done = False
  7291.      
  7292.      While Not (db Is Nothing) And Not done
  7293.           Call db.open("", "")
  7294.           If (db.designtemplatename = "StdR4AgentLog") Then
  7295.                done = True
  7296.           Elseif db.filename = "agentlog.nsf" Then
  7297.                done = True
  7298.           Else
  7299.                Set db = directory.getnextdatabase
  7300.           End If
  7301.      Wend
  7302.      
  7303.      If done Then
  7304.           Set AgentLog = New noteslog ("Log for " & AgentName)
  7305.           Call AgentLog.opennoteslog (db.server, db.filepath)
  7306.           LogLocation = "Agent Log"
  7307.      Else     
  7308.           Dim alogdb As New notesdatabase("", "ALOG4.NTF")      
  7309.           Dim logdb As notesdatabase
  7310.           If alogdb.isopen Then               
  7311.                Set logdb = alogdb.createfromtemplate("", "agentlog", True)
  7312.                Set agentlog = New noteslog ("Log for " & AgentName)
  7313.                Call agentlog.opennoteslog ("", "agentlog.nsf")
  7314.                LogLocation = "Agent Log"
  7315.           Else
  7316.               'Agent log template not found, using print statements to log to the Notes log
  7317.                loglocation = "Notes Log"
  7318.                Exit Function               
  7319.           End If
  7320.      End If
  7321.      Set  OpenLog = Agentlog    
  7322.      Exit Function
  7323.      
  7324. ErrorRoutine:
  7325.      Messagebox Error & " (OpenLog)"
  7326.      Exit Function
  7327. End Function
  7328. '++LotusScript Development Environment:2:1:RetrieveOverInternet:1:8
  7329. Function RetrieveOverInternet (CurrentURL As Variant, Doc As Notesdocument,  LoadURLLinks) As Notesdocument
  7330.      
  7331.      '*
  7332.      '*  The purpose of this subroutine is to retrieve a web page over the net.
  7333.      '*  Various checks in here are present to determine if the user 
  7334.      '*  is trying to access an authenticated page or access via a proxy.  
  7335.      '*
  7336.      
  7337.      Dim authinfo As Variant
  7338.      Dim username As String
  7339.      Dim password As String
  7340.      Dim proxyinfo As Variant
  7341.      Dim proxyusername As String
  7342.      Dim proxypassword As String
  7343.      Dim Currentdomain As String
  7344.      
  7345.      If Doc Is Nothing Then
  7346.           
  7347.          '*
  7348.          '*  If no document was passed in then we are just dealing with a url.
  7349.           '*  Just in case the url may be from an authenticated site, we need
  7350.           '* to check the data note for the authentication information
  7351.           '*
  7352.           
  7353.           CurrentDomain = (Left(Currenturl, (Instr(8, Currenturl, "/", 1))))
  7354.           If datadoc.hasitem(currentdomain+"auth") And datadoc.hasitem(currentdomain+"proxy") Then
  7355.                authinfo =datadoc.getitemvalue(currentdomain+"auth")
  7356.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7357.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7358.                proxyinfo = datadoc.getitemvalue(currentdomain+"proxy")
  7359.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7360.                proxypassword = Right(proxyinfo(0), Len(proxyinfo(0))-(Instr(proxyinfo(0), ":"))) 
  7361.                If LoadURLLinks Then
  7362.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7363.                Else
  7364.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password,proxyusername,proxypassword)  
  7365.                End If
  7366.                Exit Function
  7367.           Elseif datadoc.hasitem(currentdomain+"auth") And Not datadoc.hasitem(currentdomain+"proxy") Then
  7368.                authinfo = datadoc.getitemvalue(currentdomain+"auth")
  7369.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7370.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7371.                If LoadURLLinks Then
  7372.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7373.                Else
  7374.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password)
  7375.                End If
  7376.                Exit Function
  7377.           Elseif datadoc.hasitem(currentdomain+"proxy") And Not datadoc.hasitem(currentdomain+"auth") Then
  7378.                proxyinfo = datadoc.getitemvalue(currentdomain+"proxy")
  7379.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7380.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0))-Instr(proxyinfo(0), ":")))
  7381.                If LoadURLLinks Then
  7382.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7383.                Else
  7384.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"", "", "", proxyusername, proxypassword)
  7385.                End If
  7386.                Exit Function
  7387.           Else
  7388.                If LoadURLLinks Then
  7389.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1)  
  7390.                Else
  7391.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0)
  7392.                End If
  7393.                Exit Function
  7394.           End If
  7395.           
  7396.           '*
  7397.           '*  If a document did get passed in as an argument, check to see if authentication information exists on it
  7398.           '*  If the information does exist, store it on the data note for the agent.
  7399.           '*
  7400.      Else 
  7401.           If Doc.hasitem("$User_Authentication") And Doc.hasitem("$Proxy_Authentication") Then
  7402.                authinfo = Doc.getitemvalue("$User_Authentication")
  7403.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7404.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7405.                proxyinfo = Doc.getitemvalue("$Proxy_Authentication")
  7406.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7407.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0)) -Instr(proxyinfo(0), ":"))) 
  7408.                CurrentDomain = (Left(Currenturl, (Instr(8, currenturl, "/", 1))))
  7409.                If datadoc.hasitem(currentdomain+"auth") And datadoc.hasitem(currentdomain+"proxy") Then
  7410.                     If LoadURLLinks Then
  7411.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7412.                     Else
  7413.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password,proxyusername,proxypassword)  
  7414.                     End If
  7415.                     Exit Function
  7416.                Else
  7417.                     Call datadoc.replaceitemvalue(currentdomain+"auth", authinfo)
  7418.                     Call datadoc.replaceitemvalue(currentdomain+"proxy",proxyinfo)
  7419.                     Call datadoc.save(True, False)
  7420.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7421.                End If
  7422.           Elseif Doc.hasitem("$User_Authentication") And Not Doc.hasitem("$Proxy_Authentication") Then
  7423.                authinfo = Doc.getitemvalue("$User_Authentication")
  7424.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7425.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7426.                CurrentDomain = (Left(currenturl, (Instr(8, currenturl, "/", 1))))
  7427.                If datadoc.hasitem(currentdomain+"auth") Then
  7428.                     If LoadURLLinks Then
  7429.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7430.                     Else
  7431.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password)
  7432.                     End If
  7433.                     Exit Function
  7434.                Else
  7435.                     Call datadoc.replaceitemvalue(currentdomain+"auth", authinfo)
  7436.                     Call datadoc.save(True,False)
  7437.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7438.                End If
  7439.                
  7440.           Elseif Doc.hasitem("$Proxy_Authentication") And Not Doc.hasitem("$User_Authentication") Then
  7441.                proxyinfo = Doc.getitemvalue("$Proxy_Authentication")
  7442.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7443.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0)) - Instr(proxyinfo(0), ":")))
  7444.                CurrentDomain = (Left(Currenturl, (Instr(8, currenturl, "/", 1))))
  7445.                If datadoc.hasitem(currentdomain+"proxy") Then
  7446.                     If LoadURLLinks Then
  7447.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7448.                     Else
  7449.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"", "", "", proxyusername, proxypassword)
  7450.                     End If
  7451.                     Exit Function
  7452.                Else
  7453.                     Call datadoc.replaceitemvalue(currentdomain+"proxy", proxyinfo)
  7454.                     Call datadoc.save(True,False)
  7455.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7456.                End If
  7457.                Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7458.           Else
  7459.                If LoadURLLinks Then
  7460.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1)  
  7461.                Else
  7462.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0)
  7463.                End If
  7464.           End If
  7465.      End If
  7466. End Function
  7467. '++LotusScript Development Environment:2:1:WebLocationOK:1:8
  7468. Function WebLocationOK As Integer
  7469.      
  7470.      '*
  7471.      '*  This function verifies that the current location settings are correct for local web retrievals.
  7472.      '*
  7473.      
  7474.      WebLocationOK = True
  7475.      Dim PrivateAddressBook As notesdatabase
  7476.      Dim CurrentLocation As notesdocument
  7477.      Dim LocationString As String     
  7478.      
  7479.      
  7480.      Set PrivateAddressBook = GetLocalNAB
  7481.      
  7482.      If (PrivateAddressBook Is Nothing) Then
  7483.           Call agentlog.logaction( "Cannot verify current location settings.  Unable to open private address book.  Proceeding with  agent") 
  7484.           Exit Function
  7485.      End If
  7486.      
  7487.      LocationString = Session.GetEnvironmentString ( "Location", True)
  7488.      
  7489.      If LocationString <> "" Then
  7490.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  7491.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  7492.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  7493.           If Not (CurrentLocation Is Nothing) Then
  7494.                If CurrentLocation.WebLogLevel(0) <> "0" Then
  7495.                     DebugFlag = "1"
  7496.                End If
  7497.                If CurrentLocation.WebRetriever(0) = "0" Or CurrentLocation.WebRetriever(0) = "3" Then
  7498.                     Goto CheckLocation
  7499.                Else
  7500.                     Call agentlog.logerror(5, "Your current location indicates that Notes is not specified as your Web Retriever.")
  7501.                     WebLocationOK = False
  7502.                     Exit Function
  7503.                End If
  7504. CheckLocation:
  7505.                If CurrentLocation.WebLocation(0) <> "1" Then
  7506.                     Call agentlog.logerror(6, "Your current location indicates that you are not setup for Local Web retrievals.")
  7507.                     WebLocationOK = False
  7508.                     Exit Function
  7509.                End If
  7510.           Else
  7511.                Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Can't find location document.")
  7512.                Exit Function
  7513.           End If
  7514.      Else
  7515.           Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Location string is empty." )
  7516.           Exit Function
  7517.      End If     
  7518. End Function
  7519. '++LotusScript Development Environment:2:1:GetLocalNAB:1:8
  7520. Function GetLocalNAB() As NotesDatabase
  7521.      Dim sAddressBook As String
  7522.      Dim nCommaLocation As Integer
  7523.      
  7524.      On Error Resume Next
  7525.      sAddressBook = session.GetEnvironmentString("NAMES", True)
  7526.      nCommaLocation = Instr(sAddressBook, ",")
  7527.      If nCommaLocation > 0 Then sAddressBook = Left(sAddressBook, nCommaLocation-1)
  7528.      
  7529.      Set GetLocalNAB = New NotesDatabase("",sAddressBook)
  7530. End Function
  7531. '++LotusScript Development Environment:2:2:Terminate:1:10
  7532. Sub Terminate
  7533.      
  7534. End Sub
  7535. '++LotusScript Development Environment:2:2:RemoveObjects:1:8
  7536. Sub RemoveObjects(doc As notesdocument)
  7537.      Dim imagepage As notesdocument
  7538.      If doc.hasitem("$ImageList") Then
  7539.           Dim images As Variant
  7540.           images  = doc.getitemvalue("$ImageList")
  7541.           Forall j In images
  7542.                If j <> "" Then
  7543.                     Set imagepage = db.getdocumentbyurl(j)
  7544.                     imagepage.remove True
  7545.                End If
  7546.           End Forall
  7547.      End If
  7548. End Sub
  7549. '++LotusScript Development Environment:2:2:LogAction:1:8
  7550. Sub LogAction (Action As String)
  7551.      If LogLocation = "Agent Log" Then
  7552.           Call agentlog.logaction(Action)
  7553.      Elseif LogLocation = "Notes Log" Then
  7554.           Print Action
  7555.      End If
  7556. End Sub
  7557. '++LotusScript Development Environment:2:2:LogError:1:8
  7558. Sub LogError (ErrorCode As Long, ErrorText As String)
  7559.      If LogLocation = "Agent Log" Then
  7560.           Call agentlog.logerror(ErrorCode, ErrorText)
  7561.      Else
  7562.           Print Error & ErrorText
  7563.      End If
  7564. End Sub
  7565. '++LotusScript Development Environment:2:1:GetLocationItem:1:8
  7566. Function GetLocationItem (itemname As String) As Variant
  7567.      
  7568.      '*
  7569.      '*  This function returns a data item from the current location note
  7570.      '*
  7571.      
  7572.      InstantiateAgentObjects
  7573.      GetLocationItem = ""
  7574.      Dim PrivateAddressBook As notesdatabase
  7575.      Dim CurrentLocation As notesdocument
  7576.      Dim LocationString As String     
  7577.      
  7578.      
  7579.      Set PrivateAddressBook = GetLocalNAB
  7580.      
  7581.      If (PrivateAddressBook Is Nothing) Then
  7582.           Print "Warning:  Cannot open private address book."
  7583.           Exit Function
  7584.      End If
  7585.      
  7586.      LocationString = Session.GetEnvironmentString ( "Location", True)
  7587.      
  7588.      If LocationString <> "" Then
  7589.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  7590.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  7591.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  7592.           If Not (CurrentLocation Is Nothing) Then
  7593.                GetLocationItem = CurrentLocation.getitemvalue(itemname)
  7594.           Else
  7595.                Call agentlog.logaction("Warning:  Unable to verify current location settings.  Can't find location document.") 
  7596.                Exit Function
  7597.           End If
  7598.      Else
  7599.           Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Location string is empty." )
  7600.           Exit Function
  7601.      End If     
  7602. End Function
  7603.     +(    $
  7604. O=Lotus Notes
  7605. O=Lotus Notes
  7606. PURSAFO
  7607. |.:#U
  7608. O=Lotus Notes
  7609. CN=Lotus Notes Template Development/O=Lotus Notes
  7610. PURSAFO
  7611. Fde!f^^
  7612. $ScriptLib
  7613. $ScriptLib_O
  7614. $TITLE
  7615. $Flags
  7616. $PublicAccess
  7617. 05/21/97 12:51:15 PM Teresa Deane/Iris updated [OtherDomainServers]
  7618. 05/21/97 12:51:07 PM Teresa Deane/Iris added [OtherDomainServers]
  7619. 05/21/97 12:50:59 PM Teresa Deane/Iris updated OtherDomainServers
  7620. 05/21/97 12:50:56 PM Teresa Deane/Iris updated LocalDomainServers
  7621. 05/21/97 12:50:52 PM Teresa Deane/Iris updated [LocalDomainServers]
  7622. 05/21/97 12:50:45 PM Teresa Deane/Iris added [LocalDomainServers]
  7623. 05/21/97 12:50:36 PM Teresa Deane/Iris deleted Teresa Deane/Iris
  7624. 05/21/97 12:50:33 PM Teresa Deane/Iris deleted Teresa Deane/Deane
  7625. 05/20/97 02:17:48 PM Teresa Deane/Iris added Teresa Deane/Deane
  7626. 05/20/97 02:17:46 PM Teresa Deane/Iris updated Teresa Deane/Iris
  7627. 05/20/97 02:17:46 PM Teresa Deane/Iris added Teresa Deane/Iris
  7628. 05/20/97 02:17:46 PM Teresa Deane/Iris added LocalDomainServers
  7629. 05/20/97 02:17:46 PM Teresa Deane/Iris added OtherDomainServers
  7630. -Default-
  7631. OtherDomainServers
  7632. LocalDomainServers
  7633. [LocalDomainServers]
  7634. [OtherDomainServers]
  7635.